Created
June 15, 2017 19:12
-
-
Save sarkistlt/d874d0bfe23e339d979a6898d2e5e0af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ignoreThisMessage(isUncaught, args, payload) { | |
var ignore = "Protocols, domains, and ports must match."; | |
if ( | |
payload && | |
payload.body && | |
payload.body.message && | |
payload.body.message.body && | |
!!~payload.body.message.body.indexOf(ignore) | |
) { | |
return true | |
}; | |
} | |
if (Rollbar) Rollbar.configure({checkIgnore: ignoreThisMessage}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This will fail if Rollbar doesn't load. You can't check existence of a variable that was never set.