repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix: resolve promise on charging station events once
[e-mobility-charging-stations-simulator.git]
/
src
/
charging-station
/
Helpers.ts
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;