fix: pin value when update posts

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2022-07-11 19:49:33 +08:00
parent 8b43adda65
commit 20b03d1079

View File

@@ -90,7 +90,7 @@ export class PostModel extends WriteBaseModel {
@IsDate()
@IsOptional()
@Transform(({ value }) => {
if (typeof value === 'undefined') {
if (typeof value === 'undefined' || value === null) {
return value
}
const isDateIsoString = isDateString(value)