From b1add946c2cc074ff7b30e02b0fb4cfd2f053c5b Mon Sep 17 00:00:00 2001 From: Chris Lorenzo Date: Mon, 16 Sep 2024 07:59:24 -0400 Subject: [PATCH] optimize one more loop --- src/core/CoreNode.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/core/CoreNode.ts b/src/core/CoreNode.ts index 88ee3cee..59bcfdaf 100644 --- a/src/core/CoreNode.ts +++ b/src/core/CoreNode.ts @@ -1105,11 +1105,8 @@ export class CoreNode extends EventEmitter { this.children.length > 0 && this.rtt === false ) { - for (let i = 0; i < this.children.length; i++) { - const child = this.children[i]; - if (child === undefined) { - continue; - } + for (let i = 0, length = this.children.length; i < length; i++) { + const child = this.children[i] as CoreNode; child.setUpdateType(this.childUpdateType);