Skip to content

Instantly share code, notes, and snippets.

@lachenmayer
Created October 26, 2022 17:01
Show Gist options
  • Save lachenmayer/e06438d58a5948bf8149bb4268e4c0dd to your computer and use it in GitHub Desktop.
Save lachenmayer/e06438d58a5948bf8149bb4268e4c0dd to your computer and use it in GitHub Desktop.
diff --git a/node_modules/sentry-expo/build/integrations/bare.js b/node_modules/sentry-expo/build/integrations/bare.js
index 9d48f14..fa22c54 100644
--- a/node_modules/sentry-expo/build/integrations/bare.js
+++ b/node_modules/sentry-expo/build/integrations/bare.js
@@ -77,9 +77,10 @@ class ExpoBareIntegration {
// The name of the sourcemap file in Sentry is different depending on whether it was uploaded
// by the upload-sourcemaps script in this package (in which case it will have a revisionId)
// or by the default @sentry/react-native script.
- let sentryFilename;
- sentryFilename = react_native_1.Platform.OS === 'android' ? 'index.android.bundle' : 'main.jsbundle';
- error.stack = error.stack.replace(/\/(bundle\-\d+|[\dabcdef]+\.bundle)/g, `/${sentryFilename}`);
+ if (typeof error.stack === 'string') {
+ const sentryFilename = react_native_1.Platform.OS === 'android' ? 'index.android.bundle' : 'main.jsbundle';
+ error.stack = error.stack.replace(/\/(bundle\-\d+|[\dabcdef]+\.bundle)/g, `/${sentryFilename}`);
+ }
(0, react_native_2.getCurrentHub)().withScope((scope) => {
if (isFatal) {
scope.setLevel("fatal");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment