From 3896f15668672d9eca2f1bc56e3b8383586a3770 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Thu, 6 Aug 2020 15:30:14 +0200 Subject: [PATCH] chore: add comment [skip ci] --- src/matcher/pathParserRanker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matcher/pathParserRanker.ts b/src/matcher/pathParserRanker.ts index fad25118..6910e3ac 100644 --- a/src/matcher/pathParserRanker.ts +++ b/src/matcher/pathParserRanker.ts @@ -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 -- 2.47.3