Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function initialize(appInstance) {
let sha;
// this is Heroku-specific, will not work in other environments
if (config.environment === 'production') {
sha = config.release.slice(0, 7);
} else {
sha = appInstance.application.version.slice(6, -1);
}
let env = window.location.href;
let domain = env.includes('.org') ? 'org' : 'com';
let release = `${domain}-${sha}`;
Raven.setRelease(release);
}
public async setRelease(release: string) {
Raven.setRelease(release);
return this;
}
}
setRelease(release) {
Raven.setRelease(release);
}