Commit 11c7828
fix(jsx/dom): handle empty arrays in render children loop (#4729)
* fix(jsx/dom): handle empty arrays in render children loop
When an empty array is spliced into the children list, the loop index
still increments, causing the next child to be skipped. This leads to
a TypeError when accessing properties of undefined nodes.
Add i-- and continue after splice so the loop re-examines the same
index after flattening, correctly handling empty arrays.
* ci: apply automated fixes
---------
Co-authored-by: Maks Pikov <mixelburg@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>1 parent a40d210 commit 11c7828
2 files changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
122 | 140 | | |
123 | 141 | | |
124 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
| 490 | + | |
| 491 | + | |
490 | 492 | | |
491 | 493 | | |
492 | 494 | | |
| |||
0 commit comments