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.

This commit is contained in:
Andrew Darqui
2013-10-06 04:17:06 -04:00
parent 0b299b2fe7
commit ef47f3fd15

View File

@@ -117,6 +117,7 @@ var ajaxify = {};
if (hrefEmpty(this.href) || this.target !== '' || this.protocol === 'javascript:') if (hrefEmpty(this.href) || this.target !== '' || this.protocol === 'javascript:')
return; return;
if(window.location.pathname != '/403' && window.location.pathname != '/404')
app.previousUrl = window.location.href; app.previousUrl = window.location.href;
if (!e.ctrlKey && e.which === 1) { if (!e.ctrlKey && e.which === 1) {