fix(storage-manager): remove and clear SessionStorage
This commit is contained in:
parent
8122ab10b0
commit
38b0a8eebc
@ -131,7 +131,13 @@ export class StorageManager {
|
|||||||
|
|
||||||
return this._saveToLocalStorage(val);
|
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: {
|
case LOCATION.WINDOW: {
|
||||||
let val = this._getFromWindow();
|
let val = this._getFromWindow();
|
||||||
|
|
||||||
@ -156,7 +162,8 @@ export class StorageManager {
|
|||||||
switch (location) {
|
switch (location) {
|
||||||
case LOCATION.LOCAL:
|
case LOCATION.LOCAL:
|
||||||
return this._clearLocalStorage();
|
return this._clearLocalStorage();
|
||||||
// TODO add LOCATION.SESSION
|
case LOCATION.SESSION:
|
||||||
|
return this._clearSessionStorage();
|
||||||
case LOCATION.WINDOW:
|
case LOCATION.WINDOW:
|
||||||
return this._clearWindow();
|
return this._clearWindow();
|
||||||
default:
|
default:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user