From 1f92ca9479e1a9e220667cf700cbbd396b7a9ab7 Mon Sep 17 00:00:00 2001 From: Hunter Miller Date: Mon, 23 Oct 2023 16:07:47 -0500 Subject: [PATCH] utils: dont bail if env not loaded --- ui/src/logic/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/logic/utils.ts b/ui/src/logic/utils.ts index 561ad514..3bebb09e 100644 --- a/ui/src/logic/utils.ts +++ b/ui/src/logic/utils.ts @@ -17,11 +17,11 @@ export const useMockData = import.meta.env.MODE === 'mock'; export const isStagingHosted = import.meta.env.DEV || - import.meta.env.VITE_SHIP_URL.endsWith('.test.tlon.systems') || + (import.meta.env.VITE_SHIP_URL || '').endsWith('.test.tlon.systems') || window.location.hostname.endsWith('.test.tlon.systems'); export const isHosted = isStagingHosted || - import.meta.env.VITE_SHIP_URL.endsWith('.tlon.network') || + (import.meta.env.VITE_SHIP_URL || '').endsWith('.tlon.network') || window.location.hostname.endsWith('.tlon.network'); export const hostingUploadURL = isStagingHosted