diff --git a/src/lib/light.ts b/src/lib/light.ts index b9a8240..eaa8e22 100644 --- a/src/lib/light.ts +++ b/src/lib/light.ts @@ -77,7 +77,11 @@ export class Light { timeout: timeout, }); this.activeLoginCall = false; - this.udpClient = udp.createSocket("udp4"); + if (typeof window === "undefined") { + this.udpClient = udp.createSocket("udp4"); + } else { + this.udpClient = new udp.Socket(); + } } async autoEndLoginCall(): Promise { await delay(1000);