Skip to content

Commit

Permalink
Preload last comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxfoo committed May 24, 2021
1 parent 003ac7c commit 5b9e518
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions extension/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,14 @@ module.exports = function (nodecg) {
nodecg.log.info("Preloading Comment");
(async function() {
try {
for (var i = 0, j = body.result.items.length - 1; i < body.result.items.length - 1; i++, j--) {
for (var i = 0, j = body.result.items.length - 1; i < body.result.items.length; i++, j--) {
await addComment(body.result.items[j]);
}
} catch {
nodecg.log.info("There does not appear to be any prevoius comments to load. Skipping...");
}
})();
});

}

//get channel/username from comment id.
Expand Down

0 comments on commit 5b9e518

Please sign in to comment.