Skip to content

Commit

Permalink
fix: Fix for ReferenceError: pattern is not defined (#506)
Browse files Browse the repository at this point in the history
  • Loading branch information
harmony7 committed Apr 24, 2023
1 parent e3f4bdd commit 107c9be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/precompile.js
Expand Up @@ -34,7 +34,7 @@ export function precompile(source, filename = "<input>") {
} catch {
// swallow regex parse errors here to instead throw them at the engine level
// this then also avoids regex parser bugs being thrown unnecessarily
transpiledPattern = pattern;
transpiledPattern = node.regex.pattern;
}
const transpiledRegex = `/${transpiledPattern}/${node.regex.flags}`;
precompileCalls.push(`precompile(${transpiledRegex});`);
Expand Down

0 comments on commit 107c9be

Please sign in to comment.