Skip to content

Commit 08ca723

Browse files
committed
small ref
1 parent 10b494b commit 08ca723

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/react/src/sdk.ts

+8-2
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)