diff --git a/frontend/src/pages/collection_page.tsx b/frontend/src/pages/collection_page.tsx index 9693896..ad7bdcc 100644 --- a/frontend/src/pages/collection_page.tsx +++ b/frontend/src/pages/collection_page.tsx @@ -33,8 +33,9 @@ export default function CollectionPage() { return; } - if (app.getPreFetchData()?.collection?.id === idInt) { - setCollection(app.getPreFetchData().collection); + const prefetchData = app.getPreFetchData(); + if (prefetchData?.collection?.id === idInt) { + setCollection(prefetchData.collection); return; }