Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Vue JS Syntax error: "Unexpected Token, expected

router.beforeEach((to, from, next) => {
  if (sessionStorage.getItem('authToken') !== null || to.path === '/auth') {
    next()
    }

  else {
    next('/auth')
    }
  }   <-----------
})
 
PREVIOUS NEXT
Tagged: #Vue #JS #Syntax #expected
ADD COMMENT
Topic
Name
9+3 =