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

index 03e4b48eec2b41e75a05951eb940c90f9305fffb..db28e56c7f673c6aa95de71659bd2f8c7fe22f4d 100644 (file)
@@ -102,8 +102,8 @@ export class Router {
     // elements and other stuff
     let guards: Array<() => Promise<any>>
 
-    // TODO: ensure we are leaving since we could just be changing params or not changing anything
     // TODO: is it okay to resolve all matched component or should we do it in order
+    // TODO: use only components that we are leaving (children)
     guards = await extractComponentsGuards(
       from.matched,
       'beforeRouteLeave',
@@ -119,6 +119,7 @@ export class Router {
     // check global guards beforeEach
     // avoid if we are not changing route
     // TODO: trigger on child navigation
+    // TODO: should we completely avoid a navigation towards the same route?
     if (last(to.matched) !== last(from.matched)) {
       guards = []
       for (const guard of this.beforeGuards) {