mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] component: protect against user code executing in critical section
Canceling a fiber may cause user code to be run, which means that some new renderings could be scheduled, but this could interfere with the current renderings!
This commit is contained in:
committed by
Sam Degueldre
parent
7fb166bd50
commit
fd13277e1d
@@ -79,10 +79,8 @@ export function component<P extends object>(
|
||||
let node: any = ctx.children[key];
|
||||
let isDynamic = typeof name !== "string";
|
||||
|
||||
if (node) {
|
||||
if (node.status === STATUS.DESTROYED) {
|
||||
node = undefined;
|
||||
}
|
||||
if (node && node.status === STATUS.DESTROYED) {
|
||||
node = undefined;
|
||||
}
|
||||
if (isDynamic && node && node.component.constructor !== name) {
|
||||
node = undefined;
|
||||
|
||||
Reference in New Issue
Block a user