fix: remove nullish coalescing operator

This commit is contained in:
yassinedorbozgithub 2025-01-30 08:59:32 +01:00
parent a87dd32568
commit d44d7075ab
2 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ export const BroadcastChannelProvider: FC<IBroadcastChannelProps> = ({
subscribersRef.current[event].push(callback);
return () => {
const index = subscribersRef.current[event].indexOf(callback) ?? -1;
const index = subscribersRef.current[event].indexOf(callback);
if (index !== -1) {
subscribersRef.current[event].splice(index, 1);

View File

@ -105,7 +105,7 @@ export const BroadcastChannelProvider: FC<IBroadcastChannelProps> = ({
subscribersRef.current[event].push(callback);
return () => {
const index = subscribersRef.current[event].indexOf(callback) ?? -1;
const index = subscribersRef.current[event].indexOf(callback);
if (index !== -1) {
subscribersRef.current[event].splice(index, 1);