require sentry only if dsn is available

This commit is contained in:
nklhrstv 2020-12-16 11:41:36 +02:00
parent 732f2bb53d
commit 0510110a87

View file

@ -2,10 +2,10 @@
const React = require('react');
const ReactDOM = require('react-dom');
const Sentry = require('@sentry/browser');
const App = require('./App');
if (typeof process.env.SENTRY_DSN === 'string') {
const Sentry = require('@sentry/browser');
Sentry.init({ dsn: process.env.SENTRY_DSN });
}