Replace empty buttonLabel with 'OK'
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/2b732482 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/2b732482 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/2b732482 Branch: refs/heads/1.3.x Commit: 2b732482a5cf9dc4814dcb22cf5fc6a94ee652ba Parents: 137fa7c Author: Jesse MacFadyen <[email protected]> Authored: Fri Sep 9 17:37:07 2016 -0700 Committer: Jesse MacFadyen <[email protected]> Committed: Fri Sep 9 17:37:07 2016 -0700 ---------------------------------------------------------------------- www/notification.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/2b732482/www/notification.js ---------------------------------------------------------------------- diff --git a/www/notification.js b/www/notification.js index 751f4ce..b6d4d39 100644 --- a/www/notification.js +++ b/www/notification.js @@ -39,7 +39,7 @@ module.exports = { alert: function(message, completeCallback, title, buttonLabel) { var _message = (typeof message === "string" ? message : JSON.stringify(message)); var _title = (typeof title === "string" ? title : "Alert"); - var _buttonLabel = (typeof buttonLabel === "string" ? buttonLabel : "OK"); + var _buttonLabel = (buttonLabel && typeof buttonLabel === "string" ? buttonLabel : "OK"); exec(completeCallback, null, "Notification", "alert", [_message, _title, _buttonLabel]); }, --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
