Skip to content

Commit

Permalink
fix: do not exclude required path params
Browse files Browse the repository at this point in the history
close #1623
  • Loading branch information
hyoban committed Nov 18, 2024
1 parent 96a4974 commit f6cbace
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/renderer/src/lib/path-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ export const parseRegexpPathParams = (
}
})
.filter(
(item) => typeof item === "object" && "name" in item && !excludeNames.includes(item.name),
(item) =>
typeof item === "object" &&
"name" in item &&
(!excludeNames.includes(item.name) || !item.optional),
) as PathParams[]
}
export const parseFullPathParams = (path: string, regexpPath: string) => {
Expand Down

0 comments on commit f6cbace

Please sign in to comment.