Skip to content

Commit 4575321

Browse files
Lms24mydea
andauthored
Update packages/core/src/sdk.ts
Co-authored-by: Francesco Novy <[email protected]>
1 parent 9d14585 commit 4575321

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/core/src/sdk.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ export function setCurrentClient(client: Client): void {
5555
*/
5656
function registerClientOnGlobalHub(client: Client): void {
5757
const sentryGlobal = getSentryCarrier(getMainCarrier());
58-
if (sentryGlobal.stack && typeof sentryGlobal.stack.getStackTop === 'function') {
58+
try {
5959
sentryGlobal.stack.getStackTop().client = client;
60-
}
60+
} catch {
61+
// ignore errors here
62+
}
6163
}

0 commit comments

Comments
 (0)