title: Vue-router beforeEach stuck in infinite loop when using next()
body: <p>I'm having this problem where i cant use <code>next('/login')</code>. This is my code: </p>
  
  <pre><code>*/ all imports that are needed 
  
  Vue.use(Router);
  
  const routes = [
  {path: '/', component: Home},
  {path: '/admin', component: Admin},
  {path: '/login', component: Login}]
  
  var route = new Router({
  routes: routes,
  mode: 'history' });
  
  route.beforeEach((to, from , next) =&gt; {
  console.log(to.fullPath)
  next('/login');
  });
  
  new Vue({
    el: '#app',
    router: route,
    template: '&lt;App/&gt;',
    components: {
      App
    }
  })
  </code></pre>
  
  <p>It works when i only use next() but when i give the next() function a route it's stuck within an infinite loop</p>
  
  <p><a href="https://i.stack.imgur.com/IAyKN.png" rel="noreferrer">console screenshot</a></p>