Skip to content

Commit

Permalink
Avoid error in regenerator in standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Jul 20, 2023
1 parent 21f0c5b commit f04dc30
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/babel-types/src/definitions/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -623,8 +623,10 @@ defineType("NumericLiteral", {
if (process.env.BABEL_8_BREAKING) {
// TODO(@nicolo-ribaudo) Fix regenerator to not pass negative
// numbers here.
if (!new Error().stack.includes("regenerator")) {
throw error;
if (!IS_STANDALONE) {
if (!new Error().stack.includes("regenerator")) {
throw error;
}
}
} else {
// TODO: Enable this warning once regenerator is fixed.
Expand Down

0 comments on commit f04dc30

Please sign in to comment.