mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-04 14:40:53 +00:00
[typescript-angular] Fix undefined query param (#9657)
This commit is contained in:
parent
93880a486e
commit
972ad566fe
@ -93,11 +93,16 @@ export class {{classname}} {
|
||||
{{/hasSomeFormParams}}
|
||||
|
||||
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
|
||||
{{#isQueryParamObjectFormatJson}}
|
||||
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
|
||||
{{/isQueryParamObjectFormatJson}}
|
||||
{{^isQueryParamObjectFormatJson}}
|
||||
if (typeof value === "object" && value instanceof Date === false) {
|
||||
httpParams = this.addToHttpParamsRecursive(httpParams, value);
|
||||
} else {
|
||||
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
|
||||
}
|
||||
{{/isQueryParamObjectFormatJson}}
|
||||
return httpParams;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user