Skip to content

Commit 996a37d

Browse files
committed
fix shim
1 parent dfdae98 commit 996a37d

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

packages/core/src/integrations/featureFlags/growthbook.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ export const growthbookIntegration = defineIntegration(
5151
if (typeof proto.getFeatureValue === 'function') {
5252
fill(proto, 'getFeatureValue', _wrapAndCaptureBooleanResult);
5353
}
54-
5554
},
5655

5756
processEvent(event: Event, _hint: EventHint, _client: Client): Event {
Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,7 @@
1-
import {
2-
defineIntegration,
3-
growthbookIntegration as coreGrowthbookIntegration,
4-
isBrowser,
5-
} from '@sentry/core';
1+
import { growthbookIntegration as coreGrowthbookIntegration } from '@sentry/core';
62

73
/**
8-
* Shim for the GrowthBook integration to avoid runtime errors when imported on the server.
4+
* Re-export the core GrowthBook integration for Node.js usage.
5+
* The core integration is runtime-agnostic and works in both browser and Node environments.
96
*/
10-
export const growthbookIntegrationShim = defineIntegration(
11-
(options: Parameters<typeof coreGrowthbookIntegration>[0]) => {
12-
if (!isBrowser()) {
13-
// On Node, just return the core integration so Node SDKs can also use it.
14-
return coreGrowthbookIntegration(options);
15-
}
16-
17-
// In browser, still return the integration to preserve behavior.
18-
return coreGrowthbookIntegration(options);
19-
},
20-
);
7+
export const growthbookIntegrationShim = coreGrowthbookIntegration;

0 commit comments

Comments
 (0)