]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
chore: add redirection to exploration
authorEduardo San Martin Morote <posva13@gmail.com>
Thu, 17 Oct 2019 10:51:39 +0000 (12:51 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Thu, 17 Oct 2019 10:51:39 +0000 (12:51 +0200)
explorations/html5.ts

index 1c3451cd82c118c3416596f8fc72b852d748ae48..58e70a7f12d3d19602dcfc557ea8bb91ca9bd000 100644 (file)
@@ -185,7 +185,8 @@ router.afterEach((to, from) => {
 
 router.beforeEach((to, from, next) => {
   // console.log('second guard')
-  next()
+  if (to.query.to) next(to.query.to as string)
+  else next()
 })
 
 const dirLog = {