[FIX] qweb: properly remove t-ref reference

when the node is removed from the dom
This commit is contained in:
Géry Debongnie
2019-10-10 17:08:16 +02:00
committed by aab-odoo
parent 1337aa0107
commit 4a346d0615
5 changed files with 36 additions and 1 deletions
@@ -1911,6 +1911,9 @@ exports[`t-ref can get a dynamic ref on a node 1`] = `
create: (_, n) => {
context.__owl__.refs[ref3] = n.elm;
},
destroy: () => {
delete context.__owl__.refs[ref3];
},
};
return vn1;
}"
@@ -1931,6 +1934,9 @@ exports[`t-ref can get a ref on a node 1`] = `
create: (_, n) => {
context.__owl__.refs[ref3] = n.elm;
},
destroy: () => {
delete context.__owl__.refs[ref3];
},
};
return vn1;
}"
@@ -1967,6 +1973,9 @@ exports[`t-ref refs in a loop 1`] = `
create: (_, n) => {
context.__owl__.refs[ref6] = n.elm;
},
destroy: () => {
delete context.__owl__.refs[ref6];
},
};
var _7 = context['item'];
if (_7 || _7 === 0) {