From e6fa3ae6866f81bcc37ff6aafdcf928178aa81d3 Mon Sep 17 00:00:00 2001 From: mdodgelooker <53451193+mdodgelooker@users.noreply.github.com> Date: Thu, 31 Aug 2023 16:31:38 -0700 Subject: [PATCH] Fix RegExpLiteral extra field in babel-core.ts --- src/def/babel-core.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/def/babel-core.ts b/src/def/babel-core.ts index 41eaa15d..ab60e052 100644 --- a/src/def/babel-core.ts +++ b/src/def/babel-core.ts @@ -156,7 +156,7 @@ export default function (fork: Fork) { }) .field(...makeLiteralExtra( or(RegExp, isUndefined), - exp => `/${exp.pattern}/${exp.flags || ""}`, + exp => `/${exp.source}/${exp.flags || ""}`, )) // I'm not sure why this field exists, but it's "specified" by estree: // https://github.com/estree/estree/blob/master/es5.md#regexpliteral