From 2c539947a581a49c7cbd8bb32e1c68f306f21d11 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Pasquier <contact@jbpasquier.eu>
Date: Thu, 8 Oct 2020 10:21:36 +0200
Subject: [PATCH] cicd: fix sentry integration

---
 src/components/sentry.js | 15 ++++++++-------
 src/dependencies.pug     |  2 +-
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/components/sentry.js b/src/components/sentry.js
index 5509fc18..f4063105 100644
--- a/src/components/sentry.js
+++ b/src/components/sentry.js
@@ -1,7 +1,8 @@
-Sentry.init({
-    dsn: 'https://b4b29557689049a39168599577adb940@sentry.startinblox.com/4',
-    integrations: [new Sentry.Integrations.BrowserTracing()],
-    environment: document.location.hostname,
-    tracesSampleRate: 1.0,
-  });
-  
\ No newline at end of file
+if(typeof Sentry !== 'undefined') {
+    Sentry.init({
+        dsn: 'https://b4b29557689049a39168599577adb940@sentry.startinblox.com/4',
+        integrations: [new Sentry.Integrations.BrowserTracing()],
+        environment: document.location.hostname,
+        tracesSampleRate: 1.0,
+    });
+}
\ No newline at end of file
diff --git a/src/dependencies.pug b/src/dependencies.pug
index 703d8474..754c4865 100644
--- a/src/dependencies.pug
+++ b/src/dependencies.pug
@@ -1,4 +1,4 @@
-script(src="https://browser.sentry-cdn.com/5.24.2/bundle.tracing.min.js" integrity="sha384-Epltozh7S1cJM2hcIRDJBbqiiVpZsNlFCciHxKIAfKN8mSTa+gMivtz7glp/30Mz" crossorigin="anonymous" defer)
+script(src="https://browser.sentry-cdn.com/5.25.0/bundle.tracing.min.js" defer)
 script(type="module" src="/components/sentry.js" defer)
 script(type="module" src="/components/hubl-search-users.js" defer)
 script(type="module" src="/components/hubl-status.js" defer)
-- 
GitLab