Skip to content

Commit

Permalink
Merge pull request #1086 from yaacov/fix-remove-alerts
Browse files Browse the repository at this point in the history
🐞 fix-remove-alerts
  • Loading branch information
yaacov authored Apr 9, 2024
2 parents 93ae60a + bf4b75a commit bc7a452
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export const addIfMissing = <T>(key: T, keys: T[]) => {
export const removeIfPresent = <T>(key: T, keys: T[]) => {
console.warn('removeIfPresent', key, keys);
const index = keys?.findIndex((k) => k === key);
if (!index || index === -1) {
if (index === undefined || index === -1) {
return;
}
keys.splice(index, 1);
Expand Down

0 comments on commit bc7a452

Please sign in to comment.