options ?= type: 'none'
options.type ?= 'none'
- options.type = messageBoxTypes.indexOf options.type
- throw new TypeError('Invalid message box type') unless options.type > -1
+ messageBoxType = messageBoxTypes.indexOf options.type
+ throw new TypeError('Invalid message box type') unless messageBoxType > -1
throw new TypeError('Buttons need to be array') unless Array.isArray options.buttons
options.detail ?= ''
options.icon ?= null
- binding.showMessageBox options.type,
+ binding.showMessageBox messageBoxType,
options.buttons,
[options.title, options.message, options.detail],
options.icon,