From d20581eee9c09db9eb4650c1c187857e1d91cda6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 27 Oct 2022 21:46:26 +0200 Subject: [PATCH] Check for null or undefined in isEmptyObject() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/utils/Utils.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/Utils.ts b/src/utils/Utils.ts index f6231998..8826f702 100644 --- a/src/utils/Utils.ts +++ b/src/utils/Utils.ts @@ -197,6 +197,9 @@ export default class Utils { } public static isEmptyObject(obj: object): boolean { + if (Utils.isNullOrUndefined(obj)) { + return false; + } // Iterates over the keys of an object, if // any exist, return false. for (const _ in obj) { -- 2.34.1