Browse Source

fix(common): Allow null on idsAreEqual function (#3171)

Twilight 1 year ago
parent
commit
7bba907389
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/core/src/common/utils.ts

+ 2 - 2
packages/core/src/common/utils.ts

@@ -35,8 +35,8 @@ export function assertFound<T>(promise: Promise<T | undefined | null>): 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();