Make sure we have the same hash in all the tabs when disconnecting
This commit is contained in:
@@ -80,7 +80,7 @@ define([
|
|||||||
|
|
||||||
var logout = common.logout = function (cb) {
|
var logout = common.logout = function (cb) {
|
||||||
[
|
[
|
||||||
fileHashKey,
|
// fileHashKey,
|
||||||
userHashKey,
|
userHashKey,
|
||||||
].forEach(function (k) {
|
].forEach(function (k) {
|
||||||
sessionStorage.removeItem(k);
|
sessionStorage.removeItem(k);
|
||||||
@@ -88,6 +88,11 @@ define([
|
|||||||
delete localStorage[k];
|
delete localStorage[k];
|
||||||
delete sessionStorage[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(); }
|
if (cb) { cb(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user