From 50f06b3b4caa4aae0335ae7bab5411c815addbe0 Mon Sep 17 00:00:00 2001 From: danielpeintner Date: Mon, 25 Sep 2023 14:00:41 +0200 Subject: [PATCH] Update packages/core/src/consumed-thing.ts Co-authored-by: Jan Romann --- packages/core/src/consumed-thing.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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) {