Skip to content

Commit

Permalink
Exclude Babel Runtime error from our own output
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Apr 2, 2021
1 parent 90bd92e commit b2b350a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/mangleErrors.js
Expand Up @@ -89,6 +89,11 @@ module.exports = babel => {

const errorMsgLiteral = evalToString(path.node.argument.arguments[0])

if (errorMsgLiteral.includes('Super expression')) {
// ignore Babel runtime error message
return
}

// Attempt to get the existing index of the error. If it is not found, add it to the array as a new error.
let errorIndex = errors.indexOf(errorMsgLiteral)
if (errorIndex === -1) {
Expand Down

0 comments on commit b2b350a

Please sign in to comment.