0đź‘Ť
âś…
if (to.path === "/forgetPassword") {
next("/forgetPassword");
}
As Matt Ellen user suggested, this will create an infinite loop, since navigating to “/forgetpassword” triggers the router beforeEach hook again.
Simply next();
should solve this problem.
Source:stackexchange.com