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

This commit is contained in:
yflory 2017-01-24 18:17:23 +01:00
parent ce1e792419
commit 015e6fc262
1 changed files with 6 additions and 1 deletions

View File

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