Skip to content

Commit

Permalink
Update packages/core/src/exposed-thing.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Romann <[email protected]>
  • Loading branch information
danielpeintner and JKRhb authored Sep 25, 2023
1 parent 73fc642 commit 84949e3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/core/src/exposed-thing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -484,10 +484,7 @@ export default class ExposedThing extends TD.Thing implements WoT.ExposedThing {
}
Helpers.validateInteractionOptions(this, this.properties[propertyName], options);
const writeHandler = this.__propertyHandlers.get(propertyName)?.writeHandler;
const form =
this.properties[propertyName].forms != null
? this.properties[propertyName].forms[options.formIndex]
: {};
const form = this.properties[propertyName]?.forms[options.formIndex] ?? {};
// call write handler (if any)
if (writeHandler != null) {
await writeHandler(new InteractionOutput(inputContent, form, this.properties[propertyName]), options);
Expand Down

0 comments on commit 84949e3

Please sign in to comment.