]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
chore: comments
authorEduardo San Martin Morote <posva13@gmail.com>
Thu, 2 May 2019 08:41:58 +0000 (10:41 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Thu, 2 May 2019 08:41:58 +0000 (10:41 +0200)
src/router.ts

index 101cffd4fcc8e32d1d16da411562e26d515822e0..4ba45d1d29b3e4da47316d0ffd1792bd5289a02c 100644 (file)
@@ -67,11 +67,14 @@ export class Router {
       })
     }
 
-    // TODO: refactor in a function, some kind of queue
     const toLocation: RouteLocationNormalized = { ...url, ...location }
+    // trigger all guards, throw if navigation is rejected
     await this.navigate(toLocation, this.currentRoute)
+
+    // change URL
     if (to.replace === true) this.history.replace(url)
     else this.history.push(url)
+
     const from = this.currentRoute
     this.currentRoute = toLocation