repositories
/
e-mobility-charging-stations-simulator.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
08b352f
)
fix: resolve promise on charging station events once
author
Jérôme Benoit
<jerome.benoit@sap.com>
Sun, 17 Dec 2023 20:23:12 +0000
(21:23 +0100)
committer
Jérôme Benoit
<jerome.benoit@sap.com>
Sun, 17 Dec 2023 20:23:12 +0000
(21:23 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/Helpers.ts
patch
|
blob
|
blame
|
history
diff --git
a/src/charging-station/Helpers.ts
b/src/charging-station/Helpers.ts
index 492d26aa10dbeb5a5d028e1a7d6d111c291ac368..4f34fe180a33b01714466c4fb3cc792335863965 100644
(file)
--- 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;