diff --git a/html/comments.html b/html/comments.html index 0b87550..bd037e3 100644 --- a/html/comments.html +++ b/html/comments.html @@ -228,7 +228,10 @@ else { } if (!noCache && commentCache[page]) addComments(commentCache[page]) -fetch(`../api${!history ? window.location.pathname : "/comments/" + lvl.playerID}?count=${compact && !auto ? 20 : 10}&page=${page}${history ? "&type=commentHistory" : ""}&${mode}`).then(res => res.json()).then(addComments) +fetch(`../api${!history ? window.location.pathname : "/comments/" + lvl.playerID}?count=${compact && !auto ? 20 : 10}&page=${page}${history ? "&type=commentHistory" : ""}&${mode}`).then((res) => { + if (res.status === 204) return []; + return res.json(); +}).then(addComments) function addComments(res) {