Skip to content

Commit 1724ce8

Browse files
Updated SDK_READY_FROM_CACHE event to be emitted alongside the SDK_READY event
1 parent 9163c48 commit 1724ce8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2.8.0 (October XX, 2025)
2+
- Updated the SDK_READY_FROM_CACHE event to be emitted alongside the SDK_READY event if it hasn’t already been emitted.
3+
14
2.7.1 (October 8, 2025)
25
- Bugfix - Update `debug` option to support log levels when `logger` option is used.
36

src/readiness/readinessManager.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { ISettings } from '../types';
33
import SplitIO from '../../types/splitio';
44
import { SDK_SPLITS_ARRIVED, SDK_SPLITS_CACHE_LOADED, SDK_SEGMENTS_ARRIVED, SDK_READY_TIMED_OUT, SDK_READY_FROM_CACHE, SDK_UPDATE, SDK_READY } from './constants';
55
import { IReadinessEventEmitter, IReadinessManager, ISegmentsEventEmitter, ISplitsEventEmitter } from './types';
6-
import { STORAGE_LOCALSTORAGE } from '../utils/constants';
76

87
function splitsEventEmitterFactory(EventEmitter: new () => SplitIO.IEventEmitter): ISplitsEventEmitter {
98
const splitsEventEmitter = objectAssign(new EventEmitter(), {
@@ -115,7 +114,7 @@ export function readinessManagerFactory(
115114
isReady = true;
116115
try {
117116
syncLastUpdate();
118-
if (!isReadyFromCache && settings.storage?.type === STORAGE_LOCALSTORAGE) {
117+
if (!isReadyFromCache) {
119118
isReadyFromCache = true;
120119
gate.emit(SDK_READY_FROM_CACHE);
121120
}

0 commit comments

Comments
 (0)