Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankWhoee committed Oct 3, 2023
1 parent 3ed027d commit 15c6542
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ if (curr_read != undefined) {

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

if (paramTitle == undefined || curr_poem == undefined || last_time_visited == undefined || today.toDateString() !== new Date(parseInt(last_time_visited)).toDateString()) {
console.log(paramTitle == null)
if (paramTitle == null && (curr_poem == undefined || last_time_visited == undefined || today.toDateString() !== new Date(parseInt(last_time_visited)).toDateString())) {
showRandomPoem().then((res) => {
let id = res[0];
let title = res[1];
Expand Down

0 comments on commit 15c6542

Please sign in to comment.