fix: remove .catch() from Supabase channel.subscribe() calls
Some checks are pending
Build / build (push) Waiting to run
Deploy / deploy (push) Waiting to run
Lint & Type Check / lint (push) Waiting to run
Security Scan / semgrep (push) Waiting to run
Security Scan / dependency-check (push) Waiting to run
Test / test (18.x) (push) Waiting to run
Test / test (20.x) (push) Waiting to run

RealtimeChannel.subscribe() returns the channel object, not a Promise.
Calling .catch() on it throws at runtime.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
AeThex 2026-04-15 02:10:22 +00:00
parent dbd980a6ec
commit be30e01a50

View file

@ -1042,7 +1042,7 @@ function PollsTab({ userId, username }: { userId?: string; username?: string })
},
);
channel.subscribe().catch(() => {});
channel.subscribe();
return () => {
supabase.removeChannel(channel);
};
@ -2657,7 +2657,7 @@ function ChatTab({
},
);
channel.subscribe().catch(() => {});
channel.subscribe();
return () => {
clearInterval(interval);