add var declaration for next

This commit is contained in:
Anurag Ramdasan
2014-06-13 22:42:45 +00:00
parent 4df0efa250
commit c4fa475c7a

View File

@@ -51,7 +51,7 @@
$('#login-form').on('ajax:success', function(event, json, xhr) {
if(json.success) {
var u=decodeURI(window.location.search);
next=decodeURIComponent(u.split("next=")[1]);
var next=decodeURIComponent(u.split("next=")[1]);
if (next && !isExternal(next)) {
location.href=next;
} else if(json.redirect_url){