File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -697,14 +697,14 @@ const fillCell = (event: { name: string; group: string; type: string }) => {
697
697
698
698
fakeValue = (fakerCustom as any )[event .group ][event .name ]();
699
699
const isDateType = [... DATE , ... DATETIME ].includes (selectedCell .value .type );
700
- if ([' string' , ' number' ].includes (typeof fakeValue )) {
700
+ if (isDateType )
701
+ fakeValue = moment (fakeValue ).format (` YYYY-MM-DD HH:mm:ss${datePrecision } ` );
702
+ else if ([' string' , ' number' ].includes (typeof fakeValue )) {
701
703
if (typeof fakeValue === ' number' )
702
704
fakeValue = String (fakeValue );
703
- if (selectedCell .value .length && ! isDateType )
705
+ if (selectedCell .value .length )
704
706
fakeValue = fakeValue .substring (0 , selectedCell .value .length < 1024 ? Number (selectedCell .value .length ) : 1024 );
705
707
}
706
- else if (isDateType )
707
- fakeValue = moment (fakeValue ).format (` YYYY-MM-DD HH:mm:ss${datePrecision } ` );
708
708
else if (TIME .includes (selectedCell .value .type ))
709
709
fakeValue = moment (fakeValue ).format (` HH:mm:ss${datePrecision } ` );
710
710
You can’t perform that action at this time.
0 commit comments