observer fix
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
This commit is contained in:
parent
54c381de8e
commit
4d874b5c9a
1 changed files with 2 additions and 2 deletions
|
@ -33,8 +33,8 @@ class Observer {
|
|||
* @param {any} msg The message to send to the observers
|
||||
*/
|
||||
async emit(msg) {
|
||||
Promise.all(
|
||||
Array.from(this._handlers).map((handler) => async () => {
|
||||
return Promise.all(
|
||||
Array.from(this._handlers).map(async (handler) => {
|
||||
try {
|
||||
await handler(msg);
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in a new issue