diff --git a/packages/core/src/consumed-thing.ts b/packages/core/src/consumed-thing.ts index 8161dc188..f9d08fa1b 100644 --- a/packages/core/src/consumed-thing.ts +++ b/packages/core/src/consumed-thing.ts @@ -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) {