[FIX] transition: no crash if added/removed quickly

This commit should fix crashes coming from transition code on nodes.
This does not impact transitions on components.

closes #637
closes #641
This commit is contained in:
Géry Debongnie
2020-02-20 13:46:00 +01:00
committed by aab-odoo
parent b00188c1ce
commit ce052e0992
3 changed files with 51 additions and 0 deletions
@@ -177,3 +177,24 @@ exports[`animations t-transition, on a simple node (insert) 1`] = `
return vn1;
}"
`;
exports[`animations t-transition, on a simple node, not in the DOM 1`] = `
"function anonymous(context, extra
) {
// Template name: \\"test\\"
let utils = this.constructor.utils;
let h = this.h;
let c1 = [], p1 = {key:1};
let vn1 = h('span', p1, c1);
p1.hook = {
insert: vn => {
utils.transitionInsert(vn, 'chimay');
},
remove: (vn, rm) => {
utils.transitionRemove(vn, 'chimay', rm);
},
};
c1.push({text: \`blue\`});
return vn1;
}"
`;