From ad944d3c50b99eaf5b755d6b3495b9cd22643e5f Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 26 Jul 2023 11:17:20 +0100 Subject: [PATCH] Emit error:preparing if we fire preparing but never make it to ready (#87) --- src/ClientWidgetApi.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ClientWidgetApi.ts b/src/ClientWidgetApi.ts index fd8b049..6611013 100644 --- a/src/ClientWidgetApi.ts +++ b/src/ClientWidgetApi.ts @@ -217,6 +217,8 @@ export class ClientWidgetApi extends EventEmitter { this.allowedEvents = WidgetEventCapability.findEventCapabilities(allowedCaps); this.notifyCapabilities(requestedCaps); this.emit("ready"); + }).catch(e => { + this.emit("error:preparing", e); }); }