Skip to content

Commit

Permalink
fix-remove-alerts
Browse files Browse the repository at this point in the history
Signed-off-by: yzamir <[email protected]>
  • Loading branch information
yaacov committed Apr 9, 2024
1 parent 93ae60a commit bf4b75a
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 bf4b75a

Please sign in to comment.