Skip to content

Commit

Permalink
Fix poem change bug
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankWhoee committed Oct 8, 2023
1 parent 9aaeec8 commit f946235
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ window.addEventListener('DOMContentLoaded', () => {

count.textContent = total_read_poems;
const today = new Date();

if (paramTitle == null && (curr_poem == undefined || last_time_visited == undefined || today.toDateString() !== new Date(parseInt(last_time_visited)).toDateString())) {
showRandomPoem();
} else if (paramTitle == undefined) {
Expand Down Expand Up @@ -149,6 +148,7 @@ window.addEventListener('DOMContentLoaded', () => {
console.log("Too long: " + title);
}
data = await getRandomPoem();
title = data["title"];
id = await getID(data);
}

Expand Down

0 comments on commit f946235

Please sign in to comment.