Fix Javascript error when reading time option is disabled
This commit is contained in:
parent
fe21f6a8c4
commit
d0377d5d9d
1 changed files with 4 additions and 1 deletions
|
@ -336,7 +336,10 @@ function handleFetchOriginalContent() {
|
|||
response.json().then((data) => {
|
||||
if (data.hasOwnProperty("content") && data.hasOwnProperty("reading_time")) {
|
||||
document.querySelector(".entry-content").innerHTML = data.content;
|
||||
document.querySelector(".entry-reading-time").innerHTML = data.reading_time;
|
||||
let entryReadingtimeElement = document.querySelector(".entry-reading-time");
|
||||
if (entryReadingtimeElement) {
|
||||
entryReadingtimeElement.innerHTML = data.reading_time;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue