Added error to post page
This commit is contained in:
@ -19,7 +19,14 @@ fetch("/pages/blog/"+search+".json").then(response => response.json()).then(data
|
|||||||
postBody.innerHTML = data.postText;
|
postBody.innerHTML = data.postText;
|
||||||
}
|
}
|
||||||
|
|
||||||
}).catch(error => console.error("Error Fetching Json"));
|
}).catch((error) => {
|
||||||
|
postTitle = document.getElementById("postTitle");
|
||||||
|
postSubTitle = document.getElementById("postSubTitle");
|
||||||
|
postText = document.getElementById("postText");
|
||||||
|
postTitle.textContent = "Error fetching post";
|
||||||
|
postSubTitle.textContent = "What happened?"
|
||||||
|
postText.textContent = "You were trying to look for " + document.location.search + " Is this correct?"
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user