🐛 Allow buttons to be optional in 'showMessageBox'

This commit is contained in:
Daniel Pham 2016-12-12 13:05:01 -05:00
parent 2fa9ca1f6d
commit 4b53cd9c3c
2 changed files with 7 additions and 7 deletions

View file

@ -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')
}