Skip to content

Commit

Permalink
big change
Browse files Browse the repository at this point in the history
  • Loading branch information
kotinash authored Jul 21, 2023
1 parent 3a92b9a commit be3f316
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Dialog {
defaultButtonType;

constructor(title, message, buttonType, iconType, defaultButtonType) {
if(typeof title === "object") {
if (typeof title === "object") {
if(!title["message"]) throw new Error('"message" arg is not available')
if(!title["title"]) throw new Error('"title" arg is not available')

Expand Down Expand Up @@ -47,12 +47,12 @@ class Dialog {
}

run() {
if(typeof this.message !== 'string') throw new Error('"message" is undefined')
if(typeof this.title !== 'string') throw new Error('"title" is undefined')
if (typeof this.message !== 'string') throw new Error('"message" is undefined')
if (typeof this.title !== 'string') throw new Error('"title" is undefined')
const { message, title, buttonType, defaultButtonType, iconType } = this

return showDialog(message, title, buttonType, defaultButtonType, iconType)
}
}

module.exports = Dialog
module.exports = Dialog

0 comments on commit be3f316

Please sign in to comment.