From f2cf32850503f5976f714d5a395072cf106a9966 Mon Sep 17 00:00:00 2001 From: Simon Hagemann Date: Mon, 26 Feb 2024 09:08:31 +0100 Subject: [PATCH] fix isObject detection (closes #14835) --- src/app/components/utils/objectutils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/utils/objectutils.ts b/src/app/components/utils/objectutils.ts index d55d17eabd5..ebedb76c254 100644 --- a/src/app/components/utils/objectutils.ts +++ b/src/app/components/utils/objectutils.ts @@ -4,7 +4,7 @@ export class ObjectUtils { } public static isObject(value, empty = true) { - return value instanceof Object && value.constructor === Object && (empty || Object.keys(value).length !== 0); + return typeof value === 'object' && !Array.isArray(value) && value != null && (empty || Object.keys(value).length !== 0); } public static equals(obj1: any, obj2: any, field?: string): boolean {