1👍
✅
Your issue is probably your condition. to.path
is the actual route not the definition, so in your example to.path
will be '/verify_email/xdGCmMGz6LrBv0s_97gDvQ'
. You need to check to.matched
instead:
const isVerifyRoute = to.matched.some(route => route.path === '/verify_email/:token');
Source:stackexchange.com