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

Esformatter crashed when there are comments in jsx #59

Open
CowSmiles opened this issue Apr 4, 2016 · 1 comment
Open

Esformatter crashed when there are comments in jsx #59

CowSmiles opened this issue Apr 4, 2016 · 1 comment

Comments

@CowSmiles
Copy link

When there is comment is jsx, the esformatter will crash reporting the following error:
"test.jsx" 10L, 242C written Error while executing esformatter! no changes made. Error: stdin Cannot read property 'value' of undefined TypeError: Cannot read property 'value' of undefined at getParentheses (/usr/lib/node_modules/esformatter/lib/hooks/expressionParentheses.js:26:66) at Object.addSpaceInsideExpressionParentheses [as addSpaceInside] (/usr/lib/node_modules/esformatter/lib/hooks/expressionParentheses.js:10:21) at transformNode (/usr/lib/node_modules/esformatter/lib/transform.js:78:25) at Array.forEach (native) at Object.moonwalk (/usr/lib/node_modules/esformatter/node_modules/rocambole/rocambole.js:432:11) at transform (/usr/lib/node_modules/esformatter/lib/transform.js:37:13) at doFormat (/usr/lib/node_modules/esformatter/lib/format.js:130:3) at Object.format (/usr/lib/node_modules/esformatter/lib/format.js:44:9) at toConsole (/usr/lib/node_modules/esformatter/lib/cli.js:214:26) at /usr/lib/node_modules/esformatter/lib/cli.js:85:7

After deleting the comment, it will works.

Test file: test.jsx.zip

@millermedeiros
Copy link

probably duplicate of millermedeiros/esformatter#427 (which was fixed on esformatter v0.9.4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants