Skip to content

Commit

Permalink
Merge pull request #98 from ziczhu/master
Browse files Browse the repository at this point in the history
Fix "onCancel not a function error" when onCancel is omitted.
  • Loading branch information
afc163 committed Sep 24, 2015
2 parents d19a96d + 8646634 commit 3320293
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/confirmbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ ConfirmBox.confirm = function (message, title, onConfirm, onCancel, options) {
// support confirm(message, title, onConfirm, options)
if (typeof onCancel === 'object' && !options) {
options = onCancel;
onCancel = null;
}

var defaults = {
Expand Down

0 comments on commit 3320293

Please sign in to comment.