From 2c94dbf8c4f7d95d204462cb09e650cd14e710bf Mon Sep 17 00:00:00 2001 From: Owen Pearson Date: Fri, 29 Sep 2023 15:21:10 +0100 Subject: [PATCH] fix: add missing id param for useStateErrors call to useChannelStateListener --- src/platform/react-hooks/src/hooks/useStateErrors.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/platform/react-hooks/src/hooks/useStateErrors.ts b/src/platform/react-hooks/src/hooks/useStateErrors.ts index 1b180213ce..ff991bb55e 100644 --- a/src/platform/react-hooks/src/hooks/useStateErrors.ts +++ b/src/platform/react-hooks/src/hooks/useStateErrors.ts @@ -19,9 +19,13 @@ export function useStateErrors(params: ChannelNameAndOptions) { params.id ); - useConnectionStateListener(['connected', 'closed'], () => { - setConnectionError(null); - }); + useConnectionStateListener( + ['connected', 'closed'], + () => { + setConnectionError(null); + }, + params.id + ); useChannelStateListener(params, ['suspended', 'failed', 'detached'], (stateChange) => { if (stateChange.reason) {