diff --git a/browser/api/lib/dialog.coffee b/browser/api/lib/dialog.coffee index fa606e1ddbdd..59568bcf5b4e 100644 --- a/browser/api/lib/dialog.coffee +++ b/browser/api/lib/dialog.coffee @@ -31,7 +31,7 @@ module.exports = binding.showSaveDialog window, options.title, options.defaultPath showMessageBox: (window, options) -> - if window?.constructor isnt BrowserWindow + if window? and window.constructor isnt BrowserWindow options = window window = null