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 e2f5a08 commit 9ea628b
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 @@ -169,9 +169,7 @@ class InternalPropertySubscription extends InternalSubscription {
if (tp == null) {
throw new Error(`ConsumedThing '${this.thing.title}' does not have property ${this.name}`);
}
if (options.formIndex == null) {
options.formIndex = this.matchingUnsubscribeForm();
}
options.formIndex ??= this.matchingUnsubscribeForm();
const { form } = this.thing.getClientFor(tp.forms, "unobserveproperty", Affordance.PropertyAffordance, options);
if (form == null) {
throw new Error(`ConsumedThing '${this.thing.title}' did not get suitable form`);
Expand Down

0 comments on commit 9ea628b

Please sign in to comment.