]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
chore: add comment [skip ci]
authorEduardo San Martin Morote <posva13@gmail.com>
Thu, 6 Aug 2020 13:30:14 +0000 (15:30 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Thu, 6 Aug 2020 13:30:14 +0000 (15:30 +0200)
src/matcher/pathParserRanker.ts

index fad25118ed5482873774cc2321b26aed8c948938..6910e3ac96ceb7a9a7c9a3c1ebd58ac491df5628 100644 (file)
@@ -235,7 +235,7 @@ export function tokensToParser(
           const text: string = Array.isArray(param) ? param.join('/') : param
           if (!text) {
             if (optional) {
-              // remove the last slash
+              // remove the last slash as we could be at the end
               if (path.endsWith('/')) path = path.slice(0, -1)
               // do not append a slash on the next iteration
               else avoidDuplicatedSlash = true