-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Reproduction
-
Make sure content/*.md has list with empty item
# Test
- a
- b
- c
- - Go to /llms-ffull.txt
Logs
ERROR [request error] [unhandled] [GET] http://localhost:3000/llms-full.txt
ℹ Error: Cannot read properties of undefined (reading '0')
⁃ at extractLeadingCheckbox (node_modules/hast-util-to-mdast/lib/handlers/li.js:117:29)
112 ┃ *
113 ┃ * @param {Readonly<Element>} node
114 ┃ * @returns {ExtractResult}
115 ┃ */
116 ┃ function extractLeadingCheckbox(node) {
❯ 117 ┃ const head = node.children[0]
118 ┃
119 ┃ if (
120 ┃ head &&
121 ┃ head.type === 'element' &&
122 ┃ head.tagName === 'input' &&
⁃ at Object.li (node_modules/hast-util-to-mdast/lib/handlers/li.js:30:28)
⁃ at mdc-element (node_modules/@nuxtjs/mdc/dist/runtime/stringify/mdc-remark.js:98:42)
⁃ at Object.one (node_modules/hast-util-to-mdast/lib/state.js:255:40)
⁃ at Object.all (node_modules/hast-util-to-mdast/lib/state.js:220:14)
⁃ at Object.list (node_modules/hast-util-to-mdast/lib/handlers/list.js:19:50)
⁃ at mdc-element (node_modules/@nuxtjs/mdc/dist/runtime/stringify/mdc-remark.js:98:42)
⁃ at Object.one (node_modules/hast-util-to-mdast/lib/state.js:255:40)
⁃ at Object.all (node_modules/hast-util-to-mdast/lib/state.js:220:14)
⁃ at Object.root (node_modules/hast-util-to-mdast/lib/handlers/root.js:18:24)
[CAUSE]
TypeError {
stack: "Cannot read properties of undefined (reading '0')\n" +
'at extractLeadingCheckbox (./node_modules/hast-util-to-mdast/lib/handlers/li.js:117:29)\n' +
'at Object.li (./node_modules/hast-util-to-mdast/lib/handlers/li.js:30:28)\n' +
'at mdc-element (./node_modules/@nuxtjs/mdc/dist/runtime/stringify/mdc-remark.js:98:42)\n' +
'at Object.one (./node_modules/hast-util-to-mdast/lib/state.js:255:40)\n' +
'at Object.all (./node_modules/hast-util-to-mdast/lib/state.js:220:14)\n' +
'at Object.list (./node_modules/hast-util-to-mdast/lib/handlers/list.js:19:50)\n' +
'at mdc-element (./node_modules/@nuxtjs/mdc/dist/runtime/stringify/mdc-remark.js:98:42)\n' +
'at Object.one (./node_modules/hast-util-to-mdast/lib/state.js:255:40)\n' +
'at Object.all (/home/n'... 201 more characters,
message: "Cannot read properties of undefined (reading '0')",
}
Metadata
Metadata
Assignees
Labels
No labels