Skip to content

Commit 7a7111a

Browse files
committed
fix: convert date to string
Signed-off-by: Rakib Ansary <rakibansary@gmail.com>
1 parent 743df77 commit 7a7111a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/common/challenge-helper.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,9 @@ class ChallengeHelper {
329329
}
330330

331331
static convertDateToISOString(startDate) {
332+
if (startDate instanceof Date) {
333+
return startDate.toISOString();
334+
}
332335
if (typeof startDate === "string" && !isNaN(startDate)) {
333336
startDate = parseInt(startDate);
334337
}

0 commit comments

Comments
 (0)