Skip to content

Conversation

@nylen
Copy link
Member

@nylen nylen commented May 23, 2017

When attempting to parse a post with empty content using the TinyMCE-based parser (the current default), the editor fails to initialize because the following error is thrown:

Uncaught TypeError: Cannot read property 'name' of undefined
at Object.parseWithTinyMCE (parser.js:165)

This happens because the parse tree of parse( '' ) has no children, so we need to move the if ( currentNode ) check from the end of the loop to the beginning.

@nylen nylen added [Feature] Parsing Related to efforts to improving the parsing of a string of data and converting it into a different f [Type] Bug An existing feature does not function as intended labels May 23, 2017
Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Parsing Related to efforts to improving the parsing of a string of data and converting it into a different f [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants