From b844e85003317e4bdf3b65e7eb54b70c976d63e4 Mon Sep 17 00:00:00 2001 From: Mark Pinero Date: Tue, 7 Jun 2022 17:23:08 -0700 Subject: [PATCH] fix: check if window exists before adding to window --- src/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 191ed7d..124014b 100644 --- a/src/index.js +++ b/src/index.js @@ -15,5 +15,7 @@ const stores = { memory: memory(), } -window.Study = Study +if (typeof window !== undefined) { + window.Study = Study +} Study.stores = stores