mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] event: no crash when using t-on + modifier on slots/components
closes #1185
This commit is contained in:
committed by
Bruno Boi
parent
b56a9c24cf
commit
31fce0926c
@@ -33,9 +33,12 @@ export function createCatcher(eventsSpec: EventsSpec): Catcher {
|
||||
this.afterNode = afterNode;
|
||||
this.child.mount(parent, afterNode);
|
||||
for (let i = 0; i < n; i++) {
|
||||
let origFn = this.handlers[i][0];
|
||||
let handler = this.handlers[i];
|
||||
// handler = [...mods, fn, comp], so we need to replace second to last elem
|
||||
let idx = handler.length - 2;
|
||||
let origFn = handler[idx];
|
||||
const self = this;
|
||||
this.handlers[i][0] = function (ev: any) {
|
||||
handler[idx] = function (ev: any) {
|
||||
const target = ev.target;
|
||||
let currentNode: any = self.child.firstNode();
|
||||
const afterNode = self.afterNode;
|
||||
|
||||
Reference in New Issue
Block a user