Suggest JSX fragment syntax in adjacent tag error (#7152)
This commit is contained in:
parent
82c6ca2f96
commit
8250ff963e
@ -471,7 +471,8 @@ export default (superClass: Class<Parser>): Class<Parser> =>
|
|||||||
if (this.match(tt.relational) && this.state.value === "<") {
|
if (this.match(tt.relational) && this.state.value === "<") {
|
||||||
this.raise(
|
this.raise(
|
||||||
this.state.start,
|
this.state.start,
|
||||||
"Adjacent JSX elements must be wrapped in an enclosing tag",
|
"Adjacent JSX elements must be wrapped in an enclosing tag. " +
|
||||||
|
"Did you want a JSX fragment <>...</>?",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"throws": "Adjacent JSX elements must be wrapped in an enclosing tag (1:22)"
|
"throws": "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>? (1:22)"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user