From bf4b75a4615416fef8f9d03d62f64e5f944ebd81 Mon Sep 17 00:00:00 2001 From: yzamir Date: Tue, 9 Apr 2024 20:41:28 +0300 Subject: [PATCH] fix-remove-alerts Signed-off-by: yzamir --- .../src/modules/Providers/views/migrate/reducer/helpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/forklift-console-plugin/src/modules/Providers/views/migrate/reducer/helpers.ts b/packages/forklift-console-plugin/src/modules/Providers/views/migrate/reducer/helpers.ts index abe82e247..0f0b86e80 100644 --- a/packages/forklift-console-plugin/src/modules/Providers/views/migrate/reducer/helpers.ts +++ b/packages/forklift-console-plugin/src/modules/Providers/views/migrate/reducer/helpers.ts @@ -255,7 +255,7 @@ export const addIfMissing = (key: T, keys: T[]) => { export const removeIfPresent = (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);