Skip to content

Commit aa15fbe

Browse files
authored
fix: hydration event should update with every event (#9310)
We were not updating hydration event id. This fixes it.
1 parent 8de8010 commit aa15fbe

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/lib/features/client-feature-toggles/delta/delta-cache.test.ts

+1
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ describe('RevisionCache', () => {
169169

170170
const hydrationEvent = deltaCache.getHydrationEvent();
171171
expect(hydrationEvent.features).toHaveLength(2);
172+
expect(hydrationEvent.eventId).toEqual(7);
172173
expect(hydrationEvent.features).toEqual(
173174
expect.arrayContaining([
174175
expect.objectContaining({ name: 'my-feature-flag' }),

src/lib/features/client-feature-toggles/delta/delta-cache.ts

+1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export class DeltaCache {
9292
break;
9393
}
9494
}
95+
this.hydrationEvent.eventId = appliedEvent.eventId;
9596
}
9697
}
9798
}

0 commit comments

Comments
 (0)