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 ac41e50 commit f49175d
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 @@ -362,10 +362,7 @@ export default class ExposedThing extends TD.Thing implements WoT.ExposedThing {
if (handler != null) {
debug(`ExposedThing '${this.title}' calls registered handler for Action '${name}'`);
Helpers.validateInteractionOptions(this, this.actions[name], options);
const form =
this.actions[name].forms != null
? this.actions[name].forms[options.formIndex]
: { contentType: "application/json" };
const form = this.actions[name].forms[options.formIndex] ?? { contentType: "application/json" };
const result: WoT.InteractionInput | void = await handler(
new InteractionOutput(inputContent, form, this.actions[name].input),
options
Expand Down

0 comments on commit f49175d

Please sign in to comment.