()
| 53 | * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there. |
| 54 | **/ |
| 55 | export function getMainCarrier(): Carrier { |
| 56 | // This ensures a Sentry carrier exists |
| 57 | getSentryCarrier(GLOBAL_OBJ); |
| 58 | return GLOBAL_OBJ; |
| 59 | } |
| 60 | |
| 61 | /** Will either get the existing sentry carrier, or create a new one. */ |
| 62 | export function getSentryCarrier(carrier: Carrier): SentryCarrier { |