From f5b386b7b7673c8b4a87106ad1b3e2da25a8796e Mon Sep 17 00:00:00 2001 From: danielpeintner Date: Thu, 21 Sep 2023 10:37:04 +0200 Subject: [PATCH] Update packages/td-tools/src/thing-model-helpers.ts Co-authored-by: Cristiano Aguzzi --- packages/td-tools/src/thing-model-helpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/td-tools/src/thing-model-helpers.ts b/packages/td-tools/src/thing-model-helpers.ts index 7e99cf6a6..7a20ae13e 100644 --- a/packages/td-tools/src/thing-model-helpers.ts +++ b/packages/td-tools/src/thing-model-helpers.ts @@ -625,7 +625,7 @@ export class ThingModelHelpers { keys = keys.map((el) => el.replace("{{", "").replace("}}", "")); let isValid = true; let errors; - if (keys != null && keys.length > 0 && (map === undefined || map === null)) { + if (keys?.length > 0 && (map === undefined || map === null)) { isValid = false; errors = `No map provided for model ${model.title}`; } else if (keys.length > 0) {