Fixed regression on UI event handler callbacks

This commit is contained in:
Fabio Manganiello 2021-04-02 19:44:37 +02:00
parent 33276bf697
commit ee0685363e
6 changed files with 8 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -65,9 +65,12 @@ export default {
}
for (let handler of handlers) {
if (!handler)
continue
if (handler instanceof Array)
handler = handler[0]
else if (handler instanceof Object)
else if (handler instanceof Object && !(handler instanceof Function))
handler = Object.values(handler)[0]
handler(event.args)