Skip to content

Commit

Permalink
fix(common): Allow null on idsAreEqual function (#3171)
Browse files Browse the repository at this point in the history
  • Loading branch information
twlite authored Oct 31, 2024
1 parent e03b7f0 commit 7bba907
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 7bba907

Please sign in to comment.