🐛 Allow buttons to be optional in 'showMessageBox'
This commit is contained in:
parent
2fa9ca1f6d
commit
4b53cd9c3c
2 changed files with 7 additions and 7 deletions
|
@ -61,9 +61,7 @@ module.exports = {
|
|||
|
||||
if (properties == null) {
|
||||
properties = ['openFile']
|
||||
}
|
||||
|
||||
if (!Array.isArray(properties)) {
|
||||
} else if (!Array.isArray(properties)) {
|
||||
throw new TypeError('Properties must be an array')
|
||||
}
|
||||
|
||||
|
@ -167,7 +165,9 @@ module.exports = {
|
|||
throw new TypeError('Invalid message box type')
|
||||
}
|
||||
|
||||
if (!Array.isArray(buttons)) {
|
||||
if (buttons == null) {
|
||||
buttons = []
|
||||
} else if (!Array.isArray(buttons)) {
|
||||
throw new TypeError('Buttons must be an array')
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue