Fix
All checks were successful
SteamWarCI Build successful

This commit is contained in:
2025-06-29 14:00:09 +02:00
parent 887235dc86
commit 3c6d0f8528

View File

@ -29,11 +29,12 @@ export interface Cached<T> extends Readable<T> {
export function cached<T>(normal: T, init: () => Promise<T>): Cached<T> {
const store = writable<T>(normal);
const future = new Promise<T>((resolve) => {
let f = true;
let f = false;
store.subscribe((value) => {
if (f) {
f = false;
resolve(value);
} else {
f = true;
}
});
});