Improve debug app to redirect to login if no user hash is detected
parent
151bb5bb63
commit
668dd3c2bd
|
@ -54,8 +54,13 @@ define([
|
||||||
window.addEventListener('message', onMsg);
|
window.addEventListener('message', onMsg);
|
||||||
}).nThen(function (/*waitFor*/) {
|
}).nThen(function (/*waitFor*/) {
|
||||||
if (!window.location.hash) {
|
if (!window.location.hash) {
|
||||||
window.location.hash = localStorage[Constants.userHashKey] ||
|
var hash = localStorage[Constants.userHashKey];
|
||||||
localStorage[Constants.fileHashKey];
|
if (!hash) {
|
||||||
|
sessionStorage.redirectTo = '/debug/';
|
||||||
|
window.location.href = '/login/';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
window.location.hash = hash;
|
||||||
}
|
}
|
||||||
SFCommonO.start();
|
SFCommonO.start();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue