From ef47f3fd157bfa82239a596d02e41a8adcc513f9 Mon Sep 17 00:00:00 2001 From: Andrew Darqui Date: Sun, 6 Oct 2013 04:17:06 -0400 Subject: [PATCH] if nodebb returns 403/404, don't overwrite previousUrl. If you don't do this, when logging in after a 403/404, it will redirect you to the 403/404 page. --- public/src/ajaxify.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js index 7b8cf215fb..2d0ddc273a 100644 --- a/public/src/ajaxify.js +++ b/public/src/ajaxify.js @@ -117,7 +117,8 @@ var ajaxify = {}; if (hrefEmpty(this.href) || this.target !== '' || this.protocol === 'javascript:') return; - app.previousUrl = window.location.href; + if(window.location.pathname != '/403' && window.location.pathname != '/404') + app.previousUrl = window.location.href; if (!e.ctrlKey && e.which === 1) { if (this.host === window.location.host) { @@ -192,4 +193,4 @@ var ajaxify = {}; } } -}(jQuery)); \ No newline at end of file +}(jQuery));