Skip to content

Commit

Permalink
fixup! refactor: remove now obsolete nullish coalescing
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Nov 29, 2023
1 parent f5f1210 commit a5c9e85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/binding-opcua/src/opcua-protocol-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
6 changes: 1 addition & 5 deletions packages/core/src/exposed-thing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}'`);
}
Expand Down

0 comments on commit a5c9e85

Please sign in to comment.