Skip to content

Commit c77cfc8

Browse files
committed
pass isServer to betaABTests
1 parent 0b5c45e commit c77cfc8

File tree

3 files changed

+502
-8
lines changed

3 files changed

+502
-8
lines changed

dotcom-rendering/src/components/SetABTests.importable.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { tests } from '../experiments/ab-tests';
77
import { runnableTestsToParticipations } from '../experiments/lib/ab-participations';
88
import { BetaABTests } from '../experiments/lib/beta-ab-tests';
99
import { getForcedParticipationsFromUrl } from '../lib/getAbUrlHash';
10+
import { isServer } from '../lib/isServer';
1011
import { setABTests, setBetaABTests } from '../lib/useAB';
1112
import type { ABTestSwitches } from '../model/enhance-switches';
1213
import type { ServerSideTests } from '../types/config';
@@ -92,9 +93,14 @@ export const SetABTests = ({
9293

9394
const betaAb = useMemo(
9495
() =>
95-
new BetaABTests({
96-
serverSideABTests,
97-
}),
96+
new BetaABTests(
97+
isServer
98+
? {
99+
serverSideABTests,
100+
isServer: true,
101+
}
102+
: { isServer: false },
103+
),
98104
[serverSideABTests],
99105
);
100106

0 commit comments

Comments
 (0)