Skip to content

Commit

Permalink
v8.3.4-dev.1 Endless Scrolling: fix bug that does not load comments w…
Browse files Browse the repository at this point in the history
…hen using reverse scrolling (close #1259)
  • Loading branch information
Rafael committed Apr 2, 2019
1 parent 0b13f4e commit b533937
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -51,7 +51,7 @@
"webpack-shell-plugin": "0.5.0",
"webpack-cli": "^3.1.0"
},
"devVersion": "8.3.3",
"devVersion": "8.3.4-dev.1",
"homepage": "https://github.com/gsrafael01/ESGST",
"keywords": [
"esgst",
Expand Down
6 changes: 6 additions & 0 deletions src/class/Scope.js
Expand Up @@ -21,6 +21,12 @@ class Scope {
};
}

reset(key) {
if (this.data.hasOwnProperty(key)) {
this.data[key] = [];
}
}

get comments() { return this.data.comments; }

get discussions() { return this.data.discussions; }
Expand Down
2 changes: 1 addition & 1 deletion src/modules/General/EndlessScrolling.js
Expand Up @@ -164,7 +164,7 @@ class GeneralEndlessScrolling extends Module {
for (let i = 0, n = es.mainContext.children.length; i < n; ++i) {
es.mainContext.children[0].remove();
}
this.esgst.scopes.main.comments = [];
this.esgst.scopes.main.reset(`comments`);
this.esgst.pagination.firstElementChild.firstElementChild.nextElementSibling.textContent = `0`;
if (this.esgst.paginationNavigation) {
let lastLink = this.esgst.paginationNavigation.lastElementChild;
Expand Down

0 comments on commit b533937

Please sign in to comment.