From 34a8db7cc1a68dfe2fdd4aff96dda0252707a71f Mon Sep 17 00:00:00 2001 From: sosukesuzuki Date: Fri, 6 Aug 2021 21:38:23 +0900 Subject: [PATCH] Use regexp instead of two include methods --- src/language-js/parse/babel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/language-js/parse/babel.js b/src/language-js/parse/babel.js index 59b8d8df9501..7c977d895e47 100644 --- a/src/language-js/parse/babel.js +++ b/src/language-js/parse/babel.js @@ -105,7 +105,7 @@ function createParse(parseMethod, ...optionsCombinations) { })); } - if (text.includes("#{") || text.includes("#[")) { + if (/#({|\[)/.test(text)) { combinations = combinations.map((options) => appendPlugins([recordAndTuplePlugin], options) );