File tree 2 files changed +9
-1
lines changed
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import * as Sentry from '@sentry/react-native';
10
10
import { ErrorEvent } from '@sentry/core' ;
11
11
import { isExpoGo } from '../utils/isExpoGo' ;
12
12
import { LogBox } from 'react-native' ;
13
+ import { isWeb } from '../utils/isWeb' ;
13
14
14
15
export {
15
16
// Catch any errors thrown by the Layout component.
@@ -56,8 +57,10 @@ Sentry.init({
56
57
} ) ,
57
58
navigationIntegration ,
58
59
Sentry . reactNativeTracingIntegration ( ) ,
59
- Sentry . browserReplayIntegration ( ) ,
60
60
) ;
61
+ if ( isWeb ( ) ) {
62
+ integrations . push ( Sentry . browserReplayIntegration ( ) ) ;
63
+ }
61
64
return integrations . filter ( i => i . name !== 'Dedupe' ) ;
62
65
} ,
63
66
enableAutoSessionTracking : true ,
Original file line number Diff line number Diff line change
1
+ import { Platform } from 'react-native' ;
2
+
3
+ export function isWeb ( ) : boolean {
4
+ return Platform . OS === 'web' ;
5
+ }
You can’t perform that action at this time.
0 commit comments