fix(storage-manager): remove and clear SessionStorage

This commit is contained in:
Sarah Vaupel 2020-01-29 11:07:29 +01:00 committed by Gregor Kleen
parent 25a7c3420a
commit e42452e4da

View File

@ -131,7 +131,13 @@ export class StorageManager {
return this._saveToLocalStorage(val);
}
// TODO add LOCATION.SESSION
case LOCATION.SESSION: {
let val = this._getFromSessionStorage();
delete val[key];
return this._saveToSessionStorage(val);
}
case LOCATION.WINDOW: {
let val = this._getFromWindow();
@ -156,7 +162,8 @@ export class StorageManager {
switch (location) {
case LOCATION.LOCAL:
return this._clearLocalStorage();
// TODO add LOCATION.SESSION
case LOCATION.SESSION:
return this._clearSessionStorage();
case LOCATION.WINDOW:
return this._clearWindow();
default: