fix(nuxt): stop indicator when not changing page component (#21656)

This commit is contained in:
Daniel Roe 2023-06-20 17:02:59 +01:00 committed by GitHub
parent b57d841614
commit de639e7ef9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,7 @@ export default defineComponent({
globalMiddleware.unshift(indicator.start)
router.beforeResolve((to, from) => {
if (to === from) {
if (to === from || to.matched.every((comp, index) => comp.components && comp.components?.default === from.matched[index]?.components?.default)) {
indicator.finish()
}
})