mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] blockdom: fix event_catcher traceback
When a parent component has an empty child with a t-on and an event is triggered inside the parent, blockdom checks if there is an event_catcher to call. Doing so, an empty child would cause an error. This commit fixes that.
This commit is contained in:
committed by
Géry Debongnie
parent
6f23b18cab
commit
bd199971bd
@@ -46,7 +46,7 @@ export function createCatcher(eventsSpec: EventsSpec): Catcher {
|
||||
const target = ev.target;
|
||||
let currentNode: any = self.child.firstNode();
|
||||
const afterNode = self.afterNode;
|
||||
while (currentNode !== afterNode) {
|
||||
while (currentNode && currentNode !== afterNode) {
|
||||
if (currentNode.contains(target)) {
|
||||
return origFn.call(this, ev);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user