From 7adc0ab9bc25505402feb9ebd2891d61482677ff Mon Sep 17 00:00:00 2001 From: Reto Kaiser Date: Sun, 23 Feb 2020 18:48:31 +0100 Subject: [PATCH] Use optimized path in compareIds() also when .id has type "number" --- src/util/OrmUtils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/OrmUtils.ts b/src/util/OrmUtils.ts index 63aa9c7c10..6af1d63cd1 100644 --- a/src/util/OrmUtils.ts +++ b/src/util/OrmUtils.ts @@ -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 ) {