Closed asmsuechan closed 7 years ago
Hi, @medfreeman. What do you think?
Thank you !
@medfreeman I'm experiencing the same bug. Would it be possible to get this released and published to npm? Would be greatly appreciated.
@asmsuechan @medfreeman the solution should be like this
if (heading.children &&
heading.children.length > 0 &&
heading.children[0].type === "link_open")
because heading.children might be null as well
here is an online demo
Just enable the TOC, and type a '#' on a new line, and see the error log in the console
Hi. I hit an error
TypeError: Cannot read property 'type' of undefined
when I write such a markdown below: