Skip to content

Commit

Permalink
small ref
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Feb 6, 2025
1 parent 10b494b commit 08ca723
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/react/src/sdk.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { BrowserOptions } from '@sentry/browser';
import {
getDefaultIntegrations,
init as browserInit,
initWithDefaultIntegrations as browserInitWithDefaultIntegrations,
setContext,
} from '@sentry/browser';
Expand All @@ -13,7 +13,13 @@ import { version } from 'react';
* Inits the React SDK
*/
export function init(options: BrowserOptions): Client | undefined {
return initWithDefaultIntegrations(options, getDefaultIntegrations);
const opts = {
...options,
};

applySdkMetadata(opts, 'react');
setContext('react', { version });
return browserInit(opts);
}

/**
Expand Down

0 comments on commit 08ca723

Please sign in to comment.