From a3cdb7dcfe558a9de6fd94d0358a7bc7a162c86a Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Fri, 22 May 2020 19:14:10 +0800 Subject: [PATCH] Playground: Redirect `babylon` parser to `babel` (#8382) --- website/playground/Playground.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/website/playground/Playground.js b/website/playground/Playground.js index 48574dd15..14771933a 100644 --- a/website/playground/Playground.js +++ b/website/playground/Playground.js @@ -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 = {};