We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b241012 commit f3604f5Copy full SHA for f3604f5
1 file changed
lib/storage/path-state.ts
@@ -17,6 +17,10 @@ let currentStorageState: StoragePathState = {
17
};
18
19
export function getStoragePathState(): StoragePathState {
20
+ // Keep the last synchronously assigned state as a fallback until enterWith()
21
+ // has propagated through the current async chain. This is intentionally a
22
+ // best-effort bridge for immediate reads; callers should still set state
23
+ // before spawning child work and treat AsyncLocalStorage as the source of truth.
24
return storagePathStateContext.getStore() ?? currentStorageState;
25
}
26
0 commit comments