Skip to content

Commit

Permalink
doneCallback is not necessary defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitar authored and glasser committed Dec 9, 2014
1 parent 5a70c72 commit 847e64b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/accounts-ui-unstyled/login_buttons_dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ Template._resetPasswordDialog.events({
},
'click #login-buttons-cancel-reset-password': function () {
loginButtonsSession.set('resetPasswordToken', null);
doneCallback();
if (doneCallback)
doneCallback();
}
});

Expand All @@ -59,7 +60,8 @@ var resetPassword = function () {
} else {
loginButtonsSession.set('resetPasswordToken', null);
loginButtonsSession.set('justResetPassword', true);
doneCallback();
if (doneCallback)
doneCallback();
}
});
};
Expand Down Expand Up @@ -103,7 +105,8 @@ Template._enrollAccountDialog.events({
},
'click #login-buttons-cancel-enroll-account': function () {
loginButtonsSession.set('enrollAccountToken', null);
doneCallback();
if (doneCallback)
doneCallback();
}
});

Expand All @@ -120,7 +123,8 @@ var enrollAccount = function () {
loginButtonsSession.errorMessage(error.reason || "Unknown error");
} else {
loginButtonsSession.set('enrollAccountToken', null);
doneCallback();
if (doneCallback)
doneCallback();
}
});
};
Expand Down

0 comments on commit 847e64b

Please sign in to comment.