Skip to content

Commit 797f99c

Browse files
committed
fix: Don't reset registry when there is no hub on it yet
Fixes getsentry#1969
1 parent d016289 commit 797f99c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 5.0.3
4+
5+
- [hub] fix: Don't reset registry when there is no hub on the carrier #1969
6+
- [integrations] fix: Export dedupe integration
7+
38
## 5.0.2
49

510
- [browser] fix: Remove `browser` field from `package.json`

packages/hub/src/hub.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ export function getHubFromCarrier(carrier: Carrier): Hub {
350350
if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {
351351
return carrier.__SENTRY__.hub;
352352
}
353-
carrier.__SENTRY__ = {};
353+
carrier.__SENTRY__ = carrier.__SENTRY__ || {};
354354
carrier.__SENTRY__.hub = new Hub();
355355
return carrier.__SENTRY__.hub;
356356
}

0 commit comments

Comments
 (0)