Skip to content

Commit

Permalink
fix: fixed null value converting for dates (#977)
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentinlazy committed Jan 11, 2022
1 parent daa4efb commit 42b9298
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/param-converter/convert-param.ts
Expand Up @@ -7,7 +7,7 @@ const convertParam = (value: any, propertyType: string): any => {
return Boolean(value)
}

if (['datetime', 'date'].includes(propertyType)) {
if (['datetime', 'date'].includes(propertyType) && value !== null) {
return new Date(value)
}

Expand Down

0 comments on commit 42b9298

Please sign in to comment.