Only setup sentry when not in development.
This commit is contained in:
@@ -9,6 +9,7 @@ import { Vue as VueIntegration } from "@sentry/integrations";
|
|||||||
Vue.use(VueRouter);
|
Vue.use(VueRouter);
|
||||||
|
|
||||||
const ENV = window.location.href.includes("localhost") ? "development" : "production";
|
const ENV = window.location.href.includes("localhost") ? "development" : "production";
|
||||||
|
if (ENV !== "development") {
|
||||||
Sentry.init({
|
Sentry.init({
|
||||||
dsn: "https://7debc951f0074fb68d7a76a1e3ace6fa@o364834.ingest.sentry.io/4905091",
|
dsn: "https://7debc951f0074fb68d7a76a1e3ace6fa@o364834.ingest.sentry.io/4905091",
|
||||||
integrations: [
|
integrations: [
|
||||||
@@ -16,12 +17,10 @@ Sentry.init({
|
|||||||
],
|
],
|
||||||
beforeSend: event => {
|
beforeSend: event => {
|
||||||
console.error(event);
|
console.error(event);
|
||||||
if (ENV) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// Add global GA variables
|
// Add global GA variables
|
||||||
window.ga = window.ga || function(){
|
window.ga = window.ga || function(){
|
||||||
|
|||||||
Reference in New Issue
Block a user