Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parsing empty post content with TinyMCE #875

Merged
merged 2 commits into from
May 23, 2017

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.

2 participants