@nocobase/sdk 0.7.2-alpha.7 → 0.7.4-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/APIClient.js CHANGED
@@ -197,7 +197,7 @@ export class APIClient {
197
197
  initStorage(storage) {
198
198
  if (storage) {
199
199
  this.storage = new storage(this);
200
- } else if (localStorage) {
200
+ } else if (typeof localStorage !== 'undefined') {
201
201
  this.storage = localStorage;
202
202
  } else {
203
203
  this.storage = new MemoryStorage();
package/lib/APIClient.js CHANGED
@@ -217,7 +217,7 @@ class APIClient {
217
217
  initStorage(storage) {
218
218
  if (storage) {
219
219
  this.storage = new storage(this);
220
- } else if (localStorage) {
220
+ } else if (typeof localStorage !== 'undefined') {
221
221
  this.storage = localStorage;
222
222
  } else {
223
223
  this.storage = new MemoryStorage();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/sdk",
3
- "version": "0.7.2-alpha.7",
3
+ "version": "0.7.4-alpha.2",
4
4
  "license": "Apache-2.0",
5
5
  "licenses": [
6
6
  {
@@ -18,5 +18,5 @@
18
18
  "devDependencies": {
19
19
  "axios-mock-adapter": "^1.20.0"
20
20
  },
21
- "gitHead": "c34194ae51395346b7cf1d1b6b5e127597d956ab"
21
+ "gitHead": "542d6ca11dd2f5427aa63f7f20259122d1081a88"
22
22
  }
package/src/APIClient.ts CHANGED
@@ -187,7 +187,7 @@ export class APIClient {
187
187
  private initStorage(storage?: any) {
188
188
  if (storage) {
189
189
  this.storage = new storage(this);
190
- } else if (localStorage) {
190
+ } else if (typeof localStorage !== 'undefined') {
191
191
  this.storage = localStorage;
192
192
  } else {
193
193
  this.storage = new MemoryStorage();