Fixed frontpage-sorting issue

This commit is contained in:
Kasper Rynning-Tønnesen
2018-08-10 11:59:49 +02:00
parent c20da5db3b
commit 0337a17168
3 changed files with 8 additions and 3 deletions

View File

@@ -681,7 +681,12 @@ var Channel = {
var newList = response.querySelector("#lists-script").innerHTML;
newList = newList.trim().replace("window.lists = ", "");
newList = newList.substring(0, newList.length);
window.lists = JSON.parse(newList);
try {
window.lists = JSON.parse(newList);
} catch(e) {
console.error(e);
console.log(newList);
}
response.querySelector("#lists-script").remove();
Helper.removeElement("#sidenav-overlay");
document.getElementsByTagName("main")[0].className = "center-align container";