From 3c9481f1b7ad17867a1e32ff1560faf02c12f8c6 Mon Sep 17 00:00:00 2001 From: Aria Minaei Date: Sat, 17 Sep 2022 19:07:11 +0200 Subject: [PATCH] Don't use persistent storage in ssr mode --- theatre/studio/src/Studio.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theatre/studio/src/Studio.ts b/theatre/studio/src/Studio.ts index 42f991f..7ab6fdb 100644 --- a/theatre/studio/src/Studio.ts +++ b/theatre/studio/src/Studio.ts @@ -135,7 +135,7 @@ export class Studio { storeOpts.persistenceKey = opts.persistenceKey } - if (opts?.usePersistentStorage === false) { + if (opts?.usePersistentStorage === false || typeof window === 'undefined') { storeOpts.usePersistentStorage = false }