Fixed Redirect Loop when already on /mobile
This commit is contained in:
@@ -3,7 +3,7 @@ export default defineNuxtRouteMiddleware(async (to, _from) => {
|
|||||||
|
|
||||||
console.log(await useCapacitor().getIsPhone())
|
console.log(await useCapacitor().getIsPhone())
|
||||||
|
|
||||||
if(await useCapacitor().getIsPhone()) {
|
if(await useCapacitor().getIsPhone() && _from.path !== '/mobile') {
|
||||||
return router.push('/mobile')
|
return router.push('/mobile')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user