From: Jérôme Benoit Date: Tue, 17 Nov 2020 10:10:07 +0000 (+0100) Subject: Array empty detection fix. X-Git-Tag: v1.0.1-0~195 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=fd1ee77ce04cf81c52a5e66408b148a9847eb4ec;p=e-mobility-charging-stations-simulator.git Array empty detection fix. Signed-off-by: Jérôme Benoit --- diff --git a/src/utils/Utils.ts b/src/utils/Utils.ts index 167e299d..d6fe05d4 100644 --- a/src/utils/Utils.ts +++ b/src/utils/Utils.ts @@ -162,6 +162,9 @@ export default class Utils { } static isEmptyArray(object): boolean { + if (!object) { + return true; + } if (Array.isArray(object) && object.length > 0) { return false; }