From 7ab34e4187a5d096ea983f6ed6be2f875db269b7 Mon Sep 17 00:00:00 2001 From: Jan Romann Date: Wed, 29 Nov 2023 13:53:57 +0100 Subject: [PATCH] fixup! refactor: remove now obsolete nullish coalescing --- packages/binding-opcua/src/opcua-protocol-client.ts | 2 +- packages/core/src/exposed-thing.ts | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/binding-opcua/src/opcua-protocol-client.ts b/packages/binding-opcua/src/opcua-protocol-client.ts index 67748932b..4d221a2b8 100644 --- a/packages/binding-opcua/src/opcua-protocol-client.ts +++ b/packages/binding-opcua/src/opcua-protocol-client.ts @@ -619,7 +619,7 @@ export class OPCUAProtocolClient implements ProtocolClient { for (let index = 0; index < outputArguments.length; index++) { const argument = outputArguments[index]; const { name } = argument; - const element = _variantToJSON(outputVariants[index], form.contentType); + const element = _variantToJSON(outputVariants[index], form.contentType); body[name ?? "null"] = element; } diff --git a/packages/core/src/exposed-thing.ts b/packages/core/src/exposed-thing.ts index 365106237..fd4838028 100644 --- a/packages/core/src/exposed-thing.ts +++ b/packages/core/src/exposed-thing.ts @@ -409,11 +409,7 @@ export default class ExposedThing extends TD.Thing implements WoT.ExposedThing { const form = this.properties[propertyName]?.forms[options.formIndex] ?? { contentType: "application/json", }; - return ContentManager.valueToContent( - result, - this.properties[propertyName], - form.contentType - ); + return ContentManager.valueToContent(result, this.properties[propertyName], form.contentType); } else { throw new Error(`ExposedThing '${this.title}' has no readHandler for Property '${propertyName}'`); }