Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
init() {
if (!this.can()) {
return
}
const config = this.getConfig()
try {
this._rollbar = new Rollbar(config)
this.isEnabled = true
debug('Rollbar initialized!', config)
} catch (err) {
console.warn('Error at connecting to Rollbar', err)
}
},