From 2a6fe4959236b62ffbe6fe72b76a132485c41913 Mon Sep 17 00:00:00 2001 From: dholms Date: Tue, 5 Dec 2023 15:35:33 -0600 Subject: [PATCH] another fix --- packages/bsky/src/cache/read-through.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/bsky/src/cache/read-through.ts b/packages/bsky/src/cache/read-through.ts index ce63860c74d..1d1849e8451 100644 --- a/packages/bsky/src/cache/read-through.ts +++ b/packages/bsky/src/cache/read-through.ts @@ -94,9 +94,12 @@ export class ReadThroughCache { const val = cached[key] ? (JSON.parse(cached[key]) as CacheItem) : null if (!val || this.isExpired(val)) { toFetch.push(key) - } else if (this.isStale(val)) { + continue + } + if (this.isStale(val)) { stale.push(key) - } else if (val.val) { + } + if (val.val) { results[key] = val.val } }