diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index ed7257c..fbbbafb 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -19,7 +19,7 @@ const router = createRouter({ try { item = JSON.parse(route.params.item); } catch (error) { - item = {}; // or any default value you want to set + item = {}; // default value } return { item: item, imageUrl: route.params.imageUrl }; }, diff --git a/frontend/src/views/Details.vue b/frontend/src/views/Details.vue index d146686..083b775 100644 --- a/frontend/src/views/Details.vue +++ b/frontend/src/views/Details.vue @@ -24,6 +24,7 @@ onMounted(async () => { while (true) { const {value, done} = await reader.read(); if (done) { + window.scrollTo(0, 0) break; } if (item.type === 'TV_ANIME') { @@ -44,7 +45,6 @@ onMounted(async () => { } } } - })