mirror of
https://github.com/hexastack/hexabot
synced 2025-05-04 13:02:50 +00:00
fix: remove nullish coalescing operator
This commit is contained in:
parent
a87dd32568
commit
d44d7075ab
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user