From 8b4e2adfbba7c14515ae90db873a8ba73c7a3007 Mon Sep 17 00:00:00 2001 From: Xyphyn Date: Sun, 27 Aug 2023 12:19:28 -0700 Subject: [PATCH] fix: fix SSR_ENABLED var --- src/lib/settings.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/settings.ts b/src/lib/settings.ts index e6e30fb6..6da726b9 100644 --- a/src/lib/settings.ts +++ b/src/lib/settings.ts @@ -5,7 +5,7 @@ import { env } from '$env/dynamic/public' console.log('Using the following default settings from the environment:') console.log(env) -export const SSR_ENABLED = env.PUBLIC_SSR_ENABLED.toLowerCase() == 'true' +export const SSR_ENABLED = env.PUBLIC_SSR_ENABLED?.toLowerCase() == 'true' // Returns a proper boolean or null. Used to set boolean values from env var strings while allowing nullish coalescing to set default values. const toBool = (str: string | undefined) => {