Skip to content

Commit 6159436

Browse files
committed
fix(react): Remove unnecessary withScope wrapper in captureReactException
1 parent 83445eb commit 6159436

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

packages/react/src/error.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { captureException, withScope } from '@sentry/browser';
1+
import { captureException } from '@sentry/browser';
22
import { isError } from '@sentry/core';
33
import type { ErrorInfo } from 'react';
44
import { version } from 'react';
@@ -64,10 +64,7 @@ export function captureReactException(
6464
setCause(error, errorBoundaryError);
6565
}
6666

67-
return withScope(scope => {
68-
scope.setContext('react', { componentStack });
69-
return captureException(error, hint);
70-
});
67+
return captureException(error, hint);
7168
}
7269

7370
/**

0 commit comments

Comments
 (0)