From 2def357c05fcea4eeeaa4e0c5c8660a5cf290d2e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 17 Dec 2023 21:23:12 +0100 Subject: [PATCH] fix: resolve promise on charging station events once MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/Helpers.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/charging-station/Helpers.ts b/src/charging-station/Helpers.ts index 492d26aa..4f34fe18 100644 --- a/src/charging-station/Helpers.ts +++ b/src/charging-station/Helpers.ts @@ -649,6 +649,7 @@ export const waitChargingStationEvents = async ( let events = 0; if (eventsToWait === 0) { resolve(events); + return; } emitter.on(event, () => { ++events; -- 2.34.1