Skip to content

Commit bec3aa2

Browse files
author
Jan Konstant
committed
safari footer date format fix
1 parent 993cd43 commit bec3aa2

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

vis/js/templates/footers/StandardBuiltWith.jsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,14 @@ const formatTimestamp = (timestamp) => {
3636
return "";
3737
}
3838

39-
const date = new Date(timestamp);
40-
41-
return `on ${dateFormat(date, "d mmm yyyy")} at ${dateFormat(date, "H:MM")}`;
39+
try {
40+
const date = new Date(timestamp);
41+
return `on ${dateFormat(date, "d mmm yyyy")} at ${dateFormat(
42+
date,
43+
"H:MM"
44+
)}`;
45+
} catch (error) {
46+
console.warn(error);
47+
return "";
48+
}
4249
};

0 commit comments

Comments
 (0)