Skip to content

Commit 52af079

Browse files
authored
Merge pull request #3 from TassoDigital/fix-date-issue
incorrect toISOString usage corrected.
2 parents 040f8d3 + 4613cc5 commit 52af079

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/openapi-generator/src/main/resources/typescript-nestjs/api.service.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export class {{classname}} {
8888
{{^isListContainer}}
8989
if ({{paramName}} !== undefined && {{paramName}} !== null) {
9090
{{#isDateTime}}
91-
queryParameters['{{baseName}}'] = <any>{{paramName}}.toISOString();
91+
queryParameters['{{baseName}}'] = (<any>{{paramName}} as any instanceof Date) ? ({{paramName}} as any).toISOString(): {{paramName}};
9292
{{/isDateTime}}
9393
{{^isDateTime}}
9494
queryParameters['{{baseName}}'] = <any>{{paramName}};

0 commit comments

Comments
 (0)