Skip to content

Commit b78740c

Browse files
committed
small ref
1 parent 6ef8c8c commit b78740c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/react/src/sdk.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { BrowserOptions } from '@sentry/browser';
22
import {
3-
getDefaultIntegrations,
3+
init as browserInit,
44
initWithDefaultIntegrations as browserInitWithDefaultIntegrations,
55
setContext,
66
} from '@sentry/browser';
@@ -13,7 +13,13 @@ import { version } from 'react';
1313
* Inits the React SDK
1414
*/
1515
export function init(options: BrowserOptions): Client | undefined {
16-
return initWithDefaultIntegrations(options, getDefaultIntegrations);
16+
const opts = {
17+
...options,
18+
};
19+
20+
applySdkMetadata(opts, 'react');
21+
setContext('react', { version });
22+
return browserInit(opts);
1723
}
1824

1925
/**

0 commit comments

Comments
 (0)