Skip to content

Commit fa079d2

Browse files
committed
Don't use local storage if it's not supported.
This was causing issues with react native.
1 parent 7c465d7 commit fa079d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/core/src/configuration/Configuration.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,9 @@ export class Configuration {
464464
* Use localStorage for persisting things like server configuration cache and persisted queue entries (depends on usePersistedQueueStorage).
465465
*/
466466
public useLocalStorage(): void {
467-
this.services.storage = new LocalStorage();
467+
if (globalThis?.localStorage) {
468+
this.services.storage = new LocalStorage();
469+
}
468470
}
469471

470472
/**

0 commit comments

Comments
 (0)