From 5393b3703e2647d9d19628b10b2f4165205b5e47 Mon Sep 17 00:00:00 2001 From: Jan Nowakowski Date: Tue, 17 Dec 2024 11:21:16 +0100 Subject: [PATCH] adjust to new eslint rules --- src/libs/Pusher/pusher.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/Pusher/pusher.ts b/src/libs/Pusher/pusher.ts index 8cdc13134015..1dd1628e53d2 100644 --- a/src/libs/Pusher/pusher.ts +++ b/src/libs/Pusher/pusher.ts @@ -70,7 +70,7 @@ Onyx.connect({ }); let socket: PusherWithAuthParams | null; -let pusherSocketID = ''; +let pusherSocketID: string | undefined; const socketEventCallbacks: SocketEventCallback[] = []; let customAuthorizer: ChannelAuthorizerGenerator; @@ -132,7 +132,7 @@ function init(args: Args, params?: unknown): Promise { }); socket?.connection.bind('connected', () => { - pusherSocketID = socket?.connection.socket_id ?? ''; + pusherSocketID = socket?.connection.socket_id; callSocketEventCallbacks('connected'); resolve(); }); @@ -414,7 +414,7 @@ function reconnect() { socket.connect(); } -function getPusherSocketID(): string { +function getPusherSocketID(): string | undefined { return pusherSocketID; }