[FIX] component: can destroy not yet mounted components

Sub-issue of #476
This commit is contained in:
Aaron Bohy
2019-11-20 11:08:11 +01:00
committed by Géry Debongnie
parent 7749fd3b96
commit 2922cee6ea
6 changed files with 68 additions and 33 deletions
+2 -2
View File
@@ -35,7 +35,7 @@ exports[`animations t-transition combined with component 1`] = `
};
utils.transitionRemove(vn, 'chimay', finalize);}}});
const fiber = w3.__owl__.currentFiber;
def2.then(function () {if (fiber.isCompleted) {return;} const vnode = fiber.vnode; pvnode.sel = vnode.sel; });
def2.then(function () { if (fiber.isCompleted) { w3.destroy(); return; } const vnode = fiber.vnode; pvnode.sel = vnode.sel; });
c1.push(pvnode);
w3.__owl__.pvnode = pvnode;
}
@@ -80,7 +80,7 @@ exports[`animations t-transition combined with t-component and t-if 1`] = `
};
utils.transitionRemove(vn, 'chimay', finalize);}}});
const fiber = w3.__owl__.currentFiber;
def2.then(function () {if (fiber.isCompleted) {return;} const vnode = fiber.vnode; pvnode.sel = vnode.sel; });
def2.then(function () { if (fiber.isCompleted) { w3.destroy(); return; } const vnode = fiber.vnode; pvnode.sel = vnode.sel; });
c1.push(pvnode);
w3.__owl__.pvnode = pvnode;
}