From edfd65335c68eced7a07fce1f98e0edd5ab519a1 Mon Sep 17 00:00:00 2001 From: April Hall Date: Thu, 6 Feb 2025 11:40:50 -0500 Subject: [PATCH] fix: TypeError (No Overload matches this call) --- src/lib/websocketConfig.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/websocketConfig.ts b/src/lib/websocketConfig.ts index cdac3b8..0ad72b2 100644 --- a/src/lib/websocketConfig.ts +++ b/src/lib/websocketConfig.ts @@ -10,6 +10,12 @@ let io: SocketIOServer | undefined; export function startupSocketIOServer(httpServer: HttpServer | null) { if (io) return; console.log('\x1b[35m[ws:kit]\x1b[0m setup'); + + if (!httpServer) { + console.error('Error: httpServer is null. Cannot start Socket.IO server.'); + return; + } + io = new SocketIOServer(httpServer); io.on('connection', async (socket) => {