Playground: Redirect babylon parser to babel (#8382)
This commit is contained in:
1 parent
e398ccc66d
commit
a3cdb7dcfe
1 file changed
+6
@@ -60,6 +60,12 @@ class Playground extends React.Component {
|
||||
);
|
||||
|
||||
const options = Object.assign(defaultOptions, original.options);
|
||||
|
||||
// backwards support for old parser `babylon`
|
||||
if (options.parser === "babylon") {
|
||||
options.parser = "babel";
|
||||
}
|
||||
|
||||
const content = original.content || getCodeSample(options.parser);
|
||||
const selection = {};
|
||||
|
||||
|
||||
Reference in new issue
Block a user