Skip to content

Commit 7880bba

Browse files
committed
docs(control-flow): explain seenStack push rationale (matches upstream ember-template-lint design)
1 parent a922d73 commit 7880bba

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

lib/utils/control-flow.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,14 @@ function createConditionalScope() {
185185
conditionalStack.at(-1).add(key);
186186
}
187187
} else {
188+
// Top-level conditional ended — its accumulated keys are now
189+
// unconditionally "seen" at this scope. Push as a separate frame
190+
// (rather than merging into seenStack[0]) to mirror upstream
191+
// ember-template-lint's ConditionalScope (PR #1606) and keep
192+
// per-conditional grouping for future debugging hooks. Functionally
193+
// equivalent to a single merged Set for `has()` purposes; growth is
194+
// O(top-level conditionals per template), which is bounded by source
195+
// size.
188196
seenStack.push(keys);
189197
}
190198
},

0 commit comments

Comments
 (0)