From 29addeb1e331611cf65aa013ae780fc587431550 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 18 Mar 2022 17:42:30 -0500 Subject: make it actually able to build --- src/hooks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/hooks.ts') diff --git a/src/hooks.ts b/src/hooks.ts index 6715fc3..3875b88 100644 --- a/src/hooks.ts +++ b/src/hooks.ts @@ -2,7 +2,7 @@ import cookie from 'cookie' import type { ExternalFetch, GetSession, Handle } from '@sveltejs/kit' // @ts-ignore Cloudflare Workers can't read process.env.SKYBLOCK_STATS_API_KEY but it can read SKYBLOCK_STATS_API_KEY -const skyblockStatsApiKey = SKYBLOCK_STATS_API_KEY || process.env.SKYBLOCK_STATS_API_KEY +const skyblockStatsApiKey = process?.env?.SKYBLOCK_STATS_API_KEY || SKYBLOCK_STATS_API_KEY if (!skyblockStatsApiKey) console.warn('SKYBLOCK_STATS_API_KEY is not set as an environment variable. This is required for logging in with Skyblock Stats to work. It should be the same as the `key` environment variable in skyblock-api.') -- cgit