fix Sentry import
This commit is contained in:
parent
107416109a
commit
7351c7ccac
1 changed files with 5 additions and 1 deletions
|
|
@ -2,7 +2,6 @@
|
|||
// See LICENSE.txt for license information.
|
||||
|
||||
import {Database} from '@nozbe/watermelondb';
|
||||
import Sentry from '@sentry/react-native';
|
||||
import {Breadcrumb, Event} from '@sentry/types';
|
||||
import {Platform} from 'react-native';
|
||||
import {Navigation} from 'react-native-navigation';
|
||||
|
|
@ -19,11 +18,16 @@ import {logError, logWarning} from './log';
|
|||
export const BREADCRUMB_UNCAUGHT_APP_ERROR = 'uncaught-app-error';
|
||||
export const BREADCRUMB_UNCAUGHT_NON_ERROR = 'uncaught-non-error';
|
||||
|
||||
let Sentry: any;
|
||||
export function initializeSentry() {
|
||||
if (!Config.SentryEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Sentry) {
|
||||
Sentry = require('@sentry/react-native');
|
||||
}
|
||||
|
||||
const dsn = getDsn();
|
||||
|
||||
if (!dsn) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue