Skip to content

Commit 1315c00

Browse files
committed
refactor: simplify diff
1 parent a88fb3d commit 1315c00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ export class UnleashClient extends TinyEmitter {
395395
const sessionId = await this.resolveSessionId();
396396
this.context = { sessionId, ...this.context };
397397

398-
this.lastRefreshTimestamp = await this.getLastRefreshTimestamp();
399398
const storedToggles = (await this.storage.get(storeKey)) || [];
399+
this.lastRefreshTimestamp = await this.getLastRefreshTimestamp();
400400

401401
if (
402402
this.bootstrap &&
@@ -412,9 +412,9 @@ export class UnleashClient extends TinyEmitter {
412412
this.setReady();
413413
} else {
414414
this.toggles = storedToggles;
415-
this.sdkState = 'healthy';
416415
}
417416

417+
this.sdkState = 'healthy';
418418
this.emit(EVENTS.INIT);
419419
}
420420

0 commit comments

Comments
 (0)