From efdba69b99d2c5edcf5eaf41ea45541d3fde5978 Mon Sep 17 00:00:00 2001 From: Wliu <50Wliu@users.noreply.github.com> Date: Fri, 17 Nov 2017 23:44:09 +0100 Subject: [PATCH] Assume that if callback exists it is a function --- src/application-delegate.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/application-delegate.coffee b/src/application-delegate.coffee index bfa94556c..99463455d 100644 --- a/src/application-delegate.coffee +++ b/src/application-delegate.coffee @@ -131,7 +131,7 @@ class ApplicationDelegate remote.systemPreferences.getUserDefault(key, type) confirm: ({message, detailedMessage, buttons}, callback) -> - if typeof callback is 'function' + if callback? # Async version: buttons is required to be an array remote.dialog.showMessageBox(remote.getCurrentWindow(), { type: 'info'