Playground: Redirect babylon parser to babel (#8382)

This commit is contained in:
fisker Cheung authored and GitHub committed 2020-05-22 19:14:10 +08:00
1 parent e398ccc66d
commit a3cdb7dcfe
1 file changed
+6
+6
View File
@@ -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 = {};