fix Sentry import

This commit is contained in:
Elias Nahum 2023-01-07 18:35:31 +02:00
parent 107416109a
commit 7351c7ccac
No known key found for this signature in database
GPG key ID: A2EB45B81EA1AB32

View file

@ -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) {