Skip to content

Commit

Permalink
fix: fix compilePath
Browse files Browse the repository at this point in the history
  • Loading branch information
rookie-luochao committed Apr 21, 2024
1 parent ce2d625 commit 341138f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/openapi/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { getRequestBodyContent } from "./util";

function compilePath(path: string, params: Dictionary<any> = {}): string {
return replace(path, /{([\s\S]+?)}/g, (target: string, key: string) =>
([] as string[]).concat((params as any)[key] || target).join(","),
([] as string[]).concat((params as any)[key] ?? target).join(","),
);
}

Expand Down

0 comments on commit 341138f

Please sign in to comment.