[FIX] hooks: order of brackets for multiple async hooks

This commit is contained in:
Joseph Caburnay
2020-03-29 18:10:19 +02:00
committed by Géry Debongnie
parent c469cac315
commit 2b0315c03f
2 changed files with 38 additions and 5 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ function makeAsyncHook(method: string) {
if (component.__owl__[method]) {
const current = component.__owl__[method];
component.__owl__[method] = function(...args) {
return Promise.all[(current.call(component, ...args), cb.call(component, ...args))];
return Promise.all([current.call(component, ...args), cb.call(component, ...args)]);
};
} else {
component.__owl__[method] = cb;