From 9dbeeb0a9e39146d8c099ea1e808dbab0933f82c Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 10 Jun 2025 19:50:42 -0500 Subject: [PATCH] =?UTF-8?q?=E1=B5=89=E2=81=BF=CA=B0=E1=B5=83=E2=81=BF?= =?UTF-8?q?=E1=B6=9C=E1=B5=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/state/unstable-post-source.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/state/unstable-post-source.tsx b/src/state/unstable-post-source.tsx index c2861fbe15..c24086f029 100644 --- a/src/state/unstable-post-source.tsx +++ b/src/state/unstable-post-source.tsx @@ -18,7 +18,7 @@ export type PostSource = { * A cache of sources that will be consumed by the post thread view. This is * cleaned up any time a source is consumed. */ -const transientSourcesRef = new Map() +const transientSources = new Map() /** * A cache of sources that have been consumed by the post thread view. This is @@ -26,7 +26,7 @@ const transientSourcesRef = new Map() * consumes a source, this is never reused unless a user navigates back to a * post thread view that has not been dropped from memory. */ -const consumedSourcesRef = new Map() +const consumedSources = new Map() /** * For stashing the feed that the user was browsing when they clicked on a post. @@ -39,7 +39,7 @@ export function setUnstablePostSource(key: string, source: PostSource) { `setUnstablePostSource key should be a URI containing a handle, received ${key} — use buildPostSourceKey`, ) logger.debug('set', {key, source}) - transientSourcesRef.set(key, source) + transientSources.set(key, source) } /** @@ -55,11 +55,11 @@ export function useUnstablePostSource(key: string) { key, `consumeUnstablePostSource key should be a URI containing a handle, received ${key} — use buildPostSourceKey`, ) - const source = consumedSourcesRef.get(id) || transientSourcesRef.get(key) + const source = consumedSources.get(id) || transientSources.get(key) if (source) { logger.debug('consume', {key, source}) - transientSourcesRef.delete(key) - consumedSourcesRef.set(id, source) + transientSources.delete(key) + consumedSources.set(id, source) } return source })