From a9d20792a0cebfb3f43aea0cc73730c7800a5dec Mon Sep 17 00:00:00 2001 From: Jan Romann Date: Wed, 10 Jul 2024 11:18:45 +0200 Subject: [PATCH] fixup! chore: add guard-for-in eslint rule --- packages/td-tools/src/td-parser.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/td-tools/src/td-parser.ts b/packages/td-tools/src/td-parser.ts index 6c9d2d2f7..0c19a2992 100644 --- a/packages/td-tools/src/td-parser.ts +++ b/packages/td-tools/src/td-parser.ts @@ -241,9 +241,9 @@ export function serializeTD(thing: Thing): string { } else if (copy.properties != null) { // add mandatory fields (if missing): observable, writeOnly, and readOnly for (const prop of Object.values(copy.properties)) { - prop.readOnly ??= false; - prop.writeOnly ??= false; - prop.observable ??= false; + adjustBooleanField(prop, "readOnly") + adjustBooleanField(prop, "writeOnly") + adjustBooleanField(prop, "observable") } }