Don't use persistent storage in ssr mode

This commit is contained in:
Aria Minaei 2022-09-17 19:07:11 +02:00 committed by Aria
parent 4d55ffe087
commit 3c9481f1b7

View file

@ -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
}