My SPA application has some bottom sheets components which I need to close them on back button and stay in the same page. my approach is working great in development environment but the issue is when I deploy the application into Nginx web server, onBeforeRouteLeave guard won't work as expected and changes the route url!
do You have any idea that why it's not working in production?
here is my navigation guard inside my component:
onBeforeRouteLeave((_to, _from, next) => {
if (referral.status) {
referral.status = false;
return false;
}
if (support.status) {
support.status = false;
toast.error(from.fullPath);
return false;
}
if (exit.status) {
exit.status = false;
return false;
}
if (auth.status) {
auth.status = false;
return false;
}
next();
})