Skip to content

Commit

Permalink
Merge pull request #2864 from FlowFuse/fix-config-check
Browse files Browse the repository at this point in the history
Guard against frontend or sentry being undefined
  • Loading branch information
knolleary authored Oct 2, 2023
2 parents 3784d6a + c540d39 commit 1930a70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions forge/routes/ui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ module.exports = async function (app) {
<!-- End of HubSpot Embed Code -->`
}

if (telemetry.frontend.sentry.dsn) {
injection += `<script>window.sentryConfig = { dsn: "${telemetry.frontend.sentry.dsn}", production_mode: "${telemetry.frontend.sentry.production_mode}" }</script>`
if (telemetry.frontend?.sentry?.dsn) {
injection += `<script>window.sentryConfig = { dsn: "${telemetry.frontend.sentry.dsn}", production_mode: "${telemetry.frontend.sentry.production_mode ?? true}" }</script>`
}

// inject into index.html
Expand Down

0 comments on commit 1930a70

Please sign in to comment.