Skip to content

Commit

Permalink
csharp-null-ref-fix (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
barnuri committed Aug 14, 2024
1 parent 958b09e commit 5676488
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/generators/client/CSharpClientGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ ${controllerPropsCtor}
? ''
: '?' + controllerPath.queryParams.map(x => {
if (this.getPropDesc(x.schema!).includes('[]')) {
return `{string.Join("&", q${capitalize(x.name)}.Select(x => $"${x.name}={x}"))}`;
return `{string.Join("&", q${capitalize(x.name)}?.Select(x => $"${x.name}={x}"))}`;
}
return `${x.name}={q${capitalize(x.name)}}`;
}).join('&');
Expand Down

0 comments on commit 5676488

Please sign in to comment.