diff --git a/app/assets/javascripts/base.js b/app/assets/javascripts/base.js index 8e0c3507..be3f1d50 100644 --- a/app/assets/javascripts/base.js +++ b/app/assets/javascripts/base.js @@ -50,7 +50,7 @@ $(document).on('turbolinks:load', function() { const sentrySettings = $('meta[name="sentry"]') // Workaround for Turbolinks: We must not re-initialize the Relay object when visiting another page - if (sentrySettings.data()['enabled'] && !Sentry.Replay.prototype._isInitialized) { + if (sentrySettings && sentrySettings.data()['enabled'] && !Sentry.Replay.prototype._isInitialized) { Sentry.init({ dsn: sentrySettings.data('dsn'), attachStacktrace: true,