[babel 8] Disallow sequence expressions in JSX expression containers (#12447)
* jsx: fix sequence expression at JSXAttributeValue (#8787) * jsx: fix sequence expression at JSXAttributeValue * Change logic for detecting unparenthesized expressions * use parseMaybeAssign instead of custom error handling Co-authored-by: Daniel Tschinder <daniel@tschinder.de> Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com> * I'm not good at booleans * Format * Throw a recoverable error Co-authored-by: Bruno Macabeus <macabeus@users.noreply.github.com> Co-authored-by: Daniel Tschinder <daniel@tschinder.de>
This commit is contained in:
1
packages/babel-parser/test/fixtures/jsx/basic/sequence-expression/input.js
vendored
Normal file
1
packages/babel-parser/test/fixtures/jsx/basic/sequence-expression/input.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<div>{(console.log('foo'), JSON.stringify(props))}</div>
|
||||
Reference in New Issue
Block a user