fix: localStorage is not defined
This commit is contained in:
parent
9df35933d2
commit
e2949362ba
@ -187,7 +187,7 @@ export class APIClient {
|
|||||||
private initStorage(storage?: any) {
|
private initStorage(storage?: any) {
|
||||||
if (storage) {
|
if (storage) {
|
||||||
this.storage = new storage(this);
|
this.storage = new storage(this);
|
||||||
} else if (localStorage) {
|
} else if (typeof localStorage !== 'undefined') {
|
||||||
this.storage = localStorage;
|
this.storage = localStorage;
|
||||||
} else {
|
} else {
|
||||||
this.storage = new MemoryStorage();
|
this.storage = new MemoryStorage();
|
||||||
|
Loading…
Reference in New Issue
Block a user