From e5041d847e48c3f2fa01b0785f8bedaa5f5c6e39 Mon Sep 17 00:00:00 2001 From: Josh Creek <8179928+jcreek@users.noreply.github.com> Date: Sun, 25 Jan 2026 19:38:37 +0000 Subject: [PATCH] fix(*): Ensure new partykit url is respected --- src/routes/estimation/estimation.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/routes/estimation/estimation.js b/src/routes/estimation/estimation.js index 1f0c038..81b3ee0 100644 --- a/src/routes/estimation/estimation.js +++ b/src/routes/estimation/estimation.js @@ -6,14 +6,17 @@ function generateId() { return id; } -const partyHost = import.meta.env.PUBLIC_PARTYKIT_HOST; +const partyHost = import.meta.env.PUBLIC_PARTYKIT_HOST?.trim(); const partyName = import.meta.env.PUBLIC_PARTYKIT_PARTY || 'main'; function getPartyKitHost() { if (partyHost) { return partyHost; } - return import.meta.env.DEV ? 'localhost:1999' : 'websocket.jcreek.co.uk'; + if (import.meta.env.DEV) { + return 'localhost:1999'; + } + throw new Error('PUBLIC_PARTYKIT_HOST is not set for this build.'); } function connectToWebSocket(roomId, onMessageReceived) {