mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] component: properly handle mounting a destroyed component
part of #685
This commit is contained in:
@@ -316,6 +316,9 @@ export class Component<Props extends {} = any, T extends Env = Env> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
if (__owl__.isDestroyed) {
|
||||
throw new Error("Cannot mount a destroyed component");
|
||||
}
|
||||
if (__owl__.currentFiber) {
|
||||
const currentFiber = __owl__.currentFiber;
|
||||
if (currentFiber.target === target && currentFiber.position === position) {
|
||||
|
||||
Reference in New Issue
Block a user