Merge pull request #544 from krtcom/bug_fetch_comments

cancel fetching comments if #isso-root is not available
This commit is contained in:
Jelmer Vernooij 2019-03-11 23:56:58 -04:00 committed by GitHub
commit 3eb7f349e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,6 +46,11 @@ require(["app/lib/ready", "app/config", "app/i18n", "app/api", "app/isso", "app/
} }
function fetchComments() { function fetchComments() {
if ($('#isso-root').length == 0) {
return;
}
$('#isso-root').textContent = ''; $('#isso-root').textContent = '';
api.fetch(isso_thread.getAttribute("data-isso-id") || location.pathname, api.fetch(isso_thread.getAttribute("data-isso-id") || location.pathname,
config["max-comments-top"], config["max-comments-top"],