Warn when x-for template has multiple root elements#4752
Open
calebporzio wants to merge 1 commit intomainfrom
Open
Warn when x-for template has multiple root elements#4752calebporzio wants to merge 1 commit intomainfrom
calebporzio wants to merge 1 commit intomainfrom
Conversation
This was referenced Feb 18, 2026
005259d to
3a5e95e
Compare
x-for silently discards all but the first child element of a template. This adds a console.warn so users know what's happening instead of debugging invisible behavior. Co-Authored-By: NFSL2001 <NightFurySL2001@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3a5e95e to
c34ea5e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
console.warnwhen anx-fortemplate has multiple root elements. Currently only the first is rendered and the rest are silently dropped — this makes the failure visible.Based on the problem identified in #4730 by @NightFurySL2001.
Test plan
🤖 Generated with Claude Code