From bc6dc98d893bfd8ae53af846a955a0029fa3e935 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Mon, 5 Oct 2026 22:18:52 -0400 Subject: [PATCH] Use an index in the loop over the subtags of a combined tag The `for...of` loop made one iterator for each computation of a combined tag. The loop keeps `Math.max`. A `>` comparison ignores the NaN revision of the volatile tag. Split out of #21650. Co-Authored-By: Claude Opus 5.5 (1M context) --- packages/@glimmer/validator/lib/validators.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/@glimmer/validator/lib/validators.ts b/packages/@glimmer/validator/lib/validators.ts index 66c7f1ac1cb..0bd9cf1a7ce 100644 --- a/packages/@glimmer/validator/lib/validators.ts +++ b/packages/@glimmer/validator/lib/validators.ts @@ -138,9 +138,8 @@ class MonomorphicTagImpl { if (subtag !== null) { if (Array.isArray(subtag)) { - for (const tag of subtag) { - let value = tag[COMPUTE](); - revision = Math.max(value, revision); + for (let i = 0; i < subtag.length; i++) { + revision = Math.max((subtag[i] as Tag)[COMPUTE](), revision); } } else { let subtagValue = subtag[COMPUTE]();