From ffe82c120742979cd05a3ccf4932cf71c3121592 Mon Sep 17 00:00:00 2001 From: Antoine Rollin <66251236+antoinerollindev@users.noreply.github.com> Date: Mon, 3 Feb 2025 18:32:57 +0100 Subject: [PATCH] C2-25226: Fix OpenFin unregistered intent listener (#2283) --- src/app/openfin-handler.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/app/openfin-handler.ts b/src/app/openfin-handler.ts index 15add8139..f20d64526 100644 --- a/src/app/openfin-handler.ts +++ b/src/app/openfin-handler.ts @@ -115,10 +115,11 @@ export class OpenfinHandler { */ public async unregisterIntentHandler(uuid: UUID) { const subscription = this.intentHandlerSubscriptions.get(uuid); - - const response = await subscription.unsubscribe(); - this.intentHandlerSubscriptions.delete(uuid); - return response; + if (subscription) { + const response = await subscription.unsubscribe(); + this.intentHandlerSubscriptions.delete(uuid); + return response; + } } /**