diff --git a/src/raven.js b/src/raven.js index 612816924962..2832c819855f 100644 --- a/src/raven.js +++ b/src/raven.js @@ -76,12 +76,8 @@ var Raven = { // "Script error." is hard coded into browsers for errors that it can't read. // this is the result of a script being pulled in from an external domain and CORS. - globalOptions.ignoreErrors.push('Script error.'); - globalOptions.ignoreErrors.push('Script error'); - - // Other variants of external script errors: - globalOptions.ignoreErrors.push('Javascript error: Script error on line 0'); - globalOptions.ignoreErrors.push('Javascript error: Script error. on line 0'); + globalOptions.ignoreErrors.push(/^Script error\.?$/); + globalOptions.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/); // join regexp rules into one big rule globalOptions.ignoreErrors = joinRegExp(globalOptions.ignoreErrors);