Skip to content

Commit e1f06f4

Browse files
authored
Add fallback for missing subscribers (#3731)
1 parent 75b5a8a commit e1f06f4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

assets/pubsub.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,7 @@ function publish(eventName, data) {
1919
const promises = subscribers[eventName]
2020
.map((callback) => callback(data))
2121
return Promise.all(promises);
22+
} else {
23+
return Promise.resolve()
2224
}
2325
}

0 commit comments

Comments
 (0)