fix(storage-manager): remove and clear SessionStorage
This commit is contained in:
parent
25a7c3420a
commit
e42452e4da
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user