Skip to content

Commit

Permalink
Update packages/core/src/consumed-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 9ea628b commit 50f06b3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/core/src/consumed-thing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,7 @@ class InternalEventSubscription extends InternalSubscription {
throw new Error(`ConsumedThing '${this.thing.title}' does not have event ${this.name}`);
}

if (options.formIndex == null) {
options.formIndex = this.matchingUnsubscribeForm();
}
options.formIndex ??= this.matchingUnsubscribeForm();

const { form } = this.thing.getClientFor(te.forms, "unsubscribeevent", Affordance.EventAffordance, options);
if (form == null) {
Expand Down

0 comments on commit 50f06b3

Please sign in to comment.