Compare commits

...

1 Commits

Author SHA1 Message Date
Theodore Li
c8c2b0d28b Fix race condition on resource tab reload 2026-04-04 18:44:53 -07:00

View File

@@ -188,8 +188,12 @@ export function Home({ chatId }: HomeProps = {}) {
[editQueuedMessage]
)
const hasSetResourceRef = useRef(false)
useEffect(() => {
if (!activeResourceId && !hasSetResourceRef.current) return
hasSetResourceRef.current = true
const url = new URL(window.location.href)
url.hash = ''
if (activeResourceId) {
url.searchParams.set('resource', activeResourceId)
} else {