Skip to content

Commit 6bca626

Browse files
[FSSDK-10777] update
1 parent f284c99 commit 6bca626

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,8 @@ For detailed Next.js examples covering both App Router and Pages Router patterns
504504
### Limitations
505505

506506
- **Datafile required** — SSR requires a pre-fetched datafile. Using `sdkKey` alone falls back to a failed decision.
507-
- **Static user only** — User `Promise` is not supported during SSR.
508-
- **ODP segments** — ODP audience segments require async I/O and are not available during server rendering. Pass pre-fetched segments via the `qualifiedSegments` prop on `OptimizelyProvider` to enable synchronous ODP-based decisions. Without it, consider deferring the decision to the client using the fallback pattern.
507+
- **User Promise not supported** — User `Promise` is not supported during SSR.
508+
- **ODP segments** — ODP audience segments require async I/O and are not available during server rendering. Use [`getQualifiedSegments`](#getqualifiedsegments) to pre-fetch segments server-side and pass them via the `qualifiedSegments` prop on `OptimizelyProvider` to enable synchronous ODP-based decisions. Without it, consider deferring the decision to the client using the fallback pattern.
509509

510510
For more details and workarounds, see the [Next.js Integration Guide — Limitations](docs/nextjs-integration.md#limitations).
511511

src/utils.spec.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ describe('utils', () => {
235235

236236
it('returns null when datafile is invalid or missing ODP integration', async () => {
237237
// undefined datafile
238+
// @ts-ignore
238239
expect(await utils.getQualifiedSegments('user-1')).toBeNull();
239240
// invalid JSON string
240241
expect(await utils.getQualifiedSegments('user-1', '{bad json')).toBeNull();

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ function buildGraphQLQuery(userId: string, segmentsToCheck: string[]): string {
163163
*/
164164
export async function getQualifiedSegments(
165165
userId: string,
166-
datafile?: string | Record<string, any>
166+
datafile: string | Record<string, any>
167167
): Promise<string[] | null> {
168168
let datafileObj: any;
169169

0 commit comments

Comments
 (0)