Improve debug app to redirect to login if no user hash is detected

pull/1/head
yflory 2019-02-20 10:41:29 +01:00
parent 151bb5bb63
commit 668dd3c2bd
1 changed files with 7 additions and 2 deletions

View File

@ -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();
}); });