Skip to content

Commit

Permalink
fix forgotten listener
Browse files Browse the repository at this point in the history
  • Loading branch information
kbagot committed Jan 3, 2025
1 parent e5189a4 commit b3a7471
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pages/search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ onMounted(async () => {
}
})
onUnmounted(() => {
window.removeEventListener('scroll', handleScroll)
debounceSearch.cancel()
})
const sendToPlayer = async (movie) => {
navigateTo({
path: `/movies/${movie.imdb_id}`,
Expand Down Expand Up @@ -185,7 +190,7 @@ const searchMovies = async () => {
checkAndLoadMoreContent()
} catch (error) {
loading.value = false
showError('Error searching movies:', error)
console.error('Error searching movies:', error)
} finally {
loading.value = false
}
Expand Down

0 comments on commit b3a7471

Please sign in to comment.