Commit 0fa95ccd authored by JC Brand's avatar JC Brand

Bugfix. Pass correct arguments to synchronous event handlers

parent bcd39a7f
......@@ -1565,7 +1565,7 @@ _converse.api = {
const options = args.pop();
if (options && options.synchronous) {
const events = _converse._events[name] || [];
await Promise.all(events.map(e => e.callback.call(e.ctx, args)));
await Promise.all(events.map(e => e.callback.apply(e.ctx, args.splice(1))));
} else {
_converse.trigger.apply(_converse, arguments);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment