Skip to content

Commit

Permalink
Use optimized path in compareIds() also when .id has type "number"
Browse files Browse the repository at this point in the history
  • Loading branch information
njam committed Feb 23, 2020
1 parent 4bd2e34 commit 7adc0ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/OrmUtils.ts
Expand Up @@ -130,8 +130,8 @@ export class OrmUtils {

// Optimized version for the common case
if (
typeof firstId.id === "string" &&
typeof secondId.id === "string" &&
(typeof firstId.id === "string" || typeof firstId.id === "number") &&
(typeof secondId.id === "string" || typeof secondId.id === "number") &&
Object.keys(firstId).length === 1 &&
Object.keys(secondId).length === 1
) {
Expand Down

0 comments on commit 7adc0ab

Please sign in to comment.