From 8158f9248426203f4e057cd3b7267361956b6839 Mon Sep 17 00:00:00 2001 From: mikekotikov Date: Thu, 27 Jul 2023 20:06:50 +0200 Subject: [PATCH] FIO-6964: Fixes server crashing if useSessionToken option passed --- src/sdk/Formio.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sdk/Formio.ts b/src/sdk/Formio.ts index b86d92a1..8ff8ea53 100644 --- a/src/sdk/Formio.ts +++ b/src/sdk/Formio.ts @@ -1688,6 +1688,10 @@ export class Formio { } static useSessionToken(options: string | { namespace: string}) { + if (typeof localStorage === 'undefined') { + return; + } + let namespace = options if (typeof options === 'object') { options = options.namespace