(carrier: Carrier)
| 60 | |
| 61 | /** Will either get the existing sentry carrier, or create a new one. */ |
| 62 | export function getSentryCarrier(carrier: Carrier): SentryCarrier { |
| 63 | const __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {}); |
| 64 | |
| 65 | // For now: First SDK that sets the .version property wins |
| 66 | __SENTRY__.version = __SENTRY__.version || SDK_VERSION; |
| 67 | |
| 68 | // Intentionally populating and returning the version of "this" SDK instance |
| 69 | // rather than what's set in .version so that "this" SDK always gets its carrier |
| 70 | return (__SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {}); |
| 71 | } |
| 72 | |
| 73 | /** |
| 74 | * Returns a global singleton contained in the global `__SENTRY__[]` object. |
no outgoing calls
no test coverage detected