Make sure we have the same hash in all the tabs when disconnecting

pull/1/head
yflory 8 years ago
parent ce1e792419
commit 015e6fc262

@ -80,7 +80,7 @@ define([
var logout = common.logout = function (cb) {
[
fileHashKey,
// fileHashKey,
userHashKey,
].forEach(function (k) {
sessionStorage.removeItem(k);
@ -88,6 +88,11 @@ define([
delete localStorage[k];
delete sessionStorage[k];
});
// Make sure we have an FS_hash in localStorage before reloading all the tabs
// so that we don't end up with tabs using different anon hashes
if (!localStorage[fileHashKey]) {
localStorage[fileHashKey] = common.createRandomHash();
}
if (cb) { cb(); }
};

Loading…
Cancel
Save