From 11bc06cdc564c1aade429d581fb130dfc2c4a2f7 Mon Sep 17 00:00:00 2001 From: John Costa Date: Mon, 30 Jun 2025 19:00:30 +0100 Subject: [PATCH] fix --- src/lib/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/index.ts b/src/lib/index.ts index 6783e35..d5624b0 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -1,5 +1,6 @@ // place files you want to import through the `$lib` alias in this folder. +import { building } from "$app/environment"; import { createTwitchClient } from "./twitch"; type WLEDAPI = { @@ -63,6 +64,9 @@ export const createLedClient = (_addr: string) => { }; export const twitchClient = createTwitchClient(); -twitchClient.subscribeToFollow(); + +if (!building) { + twitchClient.subscribeToFollow(); +} export const client = createLedClient("192.168.1.215");