From 7bba9073890b1f2c5131e5585a0283932c011db7 Mon Sep 17 00:00:00 2001 From: Twilight <46562212+twlite@users.noreply.github.com> Date: Thu, 31 Oct 2024 15:39:41 +0545 Subject: [PATCH] fix(common): Allow null on idsAreEqual function (#3171) --- packages/core/src/common/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/common/utils.ts b/packages/core/src/common/utils.ts index 7d5aab546d..62ce537913 100644 --- a/packages/core/src/common/utils.ts +++ b/packages/core/src/common/utils.ts @@ -35,8 +35,8 @@ export function assertFound(promise: Promise): Promise< * Compare ID values for equality, taking into account the fact that they may not be of matching types * (string or number). */ -export function idsAreEqual(id1?: ID, id2?: ID): boolean { - if (id1 === undefined || id2 === undefined) { +export function idsAreEqual(id1?: ID | null, id2?: ID | null): boolean { + if (id1 == null || id2 == null) { return false; } return id1.toString() === id2.toString();