Skip to content

Commit 4bb7045

Browse files
committed
chore: lint
1 parent a4b0de2 commit 4bb7045

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

templates/web/src/client.ts.twig

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -486,16 +486,18 @@ class Client {
486486
break;
487487
case 'event':
488488
if (!message.data) return;
489-
let data = <RealtimeResponseEvent<unknown>>message.data;
490-
if (data?.channels) {
491-
const isSubscribed = data.channels.some(channel => this.realtime.channels.has(channel));
492-
if (!isSubscribed) return;
493-
this.realtime.subscriptions.forEach(subscription => {
494-
if (data.channels.some(channel => subscription.channels.includes(channel))) {
495-
setTimeout(() => subscription.callback(data));
496-
}
497-
})
498-
}
489+
490+
const data = message.data as RealtimeResponseEvent<unknown>;
491+
if (!data?.channels) return;
492+
493+
const isSubscribed = data.channels.some(channel => this.realtime.channels.has(channel));
494+
if (!isSubscribed) return;
495+
496+
this.realtime.subscriptions.forEach(subscription => {
497+
if (data.channels.some(channel => subscription.channels.includes(channel))) {
498+
setTimeout(() => subscription.callback(data));
499+
}
500+
});
499501
break;
500502
case 'pong':
501503
break; // Handle pong response if needed

0 commit comments

Comments
 (0)