diff --git a/lib/client/client.js b/lib/client/client.js index ee57273..c0152d2 100644 --- a/lib/client/client.js +++ b/lib/client/client.js @@ -60,7 +60,7 @@ AccountsTemplates.ensureSignedIn = function(context, redirect) { }); // redirect settings - AccountsTemplates.avoidDefaultRedirect = true; + AccountsTemplates.avoidRedirect = true; AccountsTemplates.avoidClearError = true; AccountsTemplates.redirectToPrevPath = true; @@ -93,7 +93,7 @@ AccountsTemplates.linkClick = function(route) { return; } var path = AccountsTemplates.getRoutePath(route); - if (path === '#' || path === FlowRouter.current().path) { + if (path === '#' || AccountsTemplates.avoidRedirect || path === FlowRouter.current().path) { AccountsTemplates.setState(route); } else { Meteor.defer(function() { @@ -124,8 +124,8 @@ AccountsTemplates.logout = function() { }; AccountsTemplates.postSubmitRedirect = function(route) { - if (AccountsTemplates.avoidDefaultRedirect) { - AccountsTemplates.avoidDefaultRedirect = false; + if (AccountsTemplates.avoidRedirect) { + AccountsTemplates.avoidRedirect = false; if (AccountsTemplates.redirectToPrevPath) { FlowRouter.redirect(AccountsTemplates.getPrevPath()); }