diff --git a/main-src/libs/sentry.js b/main-src/libs/sentry.js index 6b54d1c3..acfbff5d 100644 --- a/main-src/libs/sentry.js +++ b/main-src/libs/sentry.js @@ -1,12 +1,12 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -const electron = require('electron'); const { init } = require('@sentry/electron'); const isRenderer = (process && process.type === 'renderer'); init({ dsn: process.env.ELECTRON_APP_SENTRY_DSN, - release: isRenderer ? electron.remote.app.getVersion() : electron.app.getVersion(), + // eslint-disable-next-line global-require + release: isRenderer ? require('@electron/remote').app.getVersion() : require('electron').app.getVersion(), });