Skip to content

Commit

Permalink
fix: time throws
Browse files Browse the repository at this point in the history
  • Loading branch information
bharatkashyap committed Jan 11, 2024
1 parent 00516f0 commit b416fd4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions public/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,10 +530,12 @@ function displaySheetCards(sheets) {
let sheetDescription = document.createElement("p");
sheetDescription.className = "card-text";

sheetDescription.innerHTML =
"Modified <strong>" +
formatRelativeTime(new Date(sheet.modifiedTime)) +
"</strong>";
if (sheet.modifiedTime) {
sheetDescription.innerHTML =
"Modified <strong>" +
formatRelativeTime(new Date(sheet.modifiedTime)) +
"</strong>";
}

sheetCardBody.appendChild(sheetTitle);
sheetCardBody.appendChild(sheetDescription);
Expand Down

0 comments on commit b416fd4

Please sign in to comment.