mirror of
https://github.com/nasa/openmct.git
synced 2024-12-18 20:57:53 +00:00
Revert "refactor(LocalStorageObjectProvider): use getItem()
and setItem()
"
This reverts commit 4f8403adab
.
This commit is contained in:
parent
d5b02b0c8c
commit
0de66401cd
@ -71,14 +71,14 @@ export default class LocalStorageObjectProvider {
|
||||
* @private
|
||||
*/
|
||||
persistSpace(space) {
|
||||
this.localStorage.setItem(this.spaceKey, JSON.stringify(space));
|
||||
this.localStorage[this.spaceKey] = JSON.stringify(space);
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
getSpace() {
|
||||
return this.localStorage.getItem(this.spaceKey);
|
||||
return this.localStorage[this.spaceKey];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -93,7 +93,7 @@ export default class LocalStorageObjectProvider {
|
||||
*/
|
||||
initializeSpace() {
|
||||
if (this.isEmpty()) {
|
||||
this.localStorage.setItem(this.spaceKey, JSON.stringify({}));
|
||||
this.localStorage[this.spaceKey] = JSON.stringify({});
|
||||
}
|
||||
}
|
||||
|
||||
@ -101,6 +101,6 @@ export default class LocalStorageObjectProvider {
|
||||
* @private
|
||||
*/
|
||||
isEmpty() {
|
||||
return this.getSpace() === null;
|
||||
return this.getSpace() === undefined;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user