Commit 43c11cb
fix(react): treat valueless boolean attrs as true in codegen
When compiling templates for React/RN, attributes written without a
value (e.g. <scroll-view scroll-y>) had their value parsed as
undefined, which JSON.stringify silently drops. Now such attributes
correctly emit `true` in the generated render function, matching
miniprogram boolean-attribute semantics.
Attributes with an explicit value (e.g. scroll-y="{{undefined}}") are
unchanged.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent db3f675 commit 43c11cb
1 file changed
Lines changed: 1 addition & 1 deletion
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
0 commit comments