mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-02 03:02:19 +08:00
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…
x
Reference in New Issue
Block a user