Skip to content

Commit

Permalink
Check whether node.children is undefined
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Turner <alex@turntrout.com>
  • Loading branch information
alexander-turner committed Apr 1, 2024
1 parent cf072f3 commit a692b32
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,10 @@ function createJsxElementProps(state, node) {
function createChildren(state, node) {
/** @type {Array<Child>} */
const children = []
if (node.children === undefined) {
return children
}

let index = -1
/** @type {Map<string, number>} */
// Note: test this when Solid doesn’t want to merge my upcoming PR.
Expand Down

0 comments on commit a692b32

Please sign in to comment.