Fix lots of warnings

This commit is contained in:
rejas
2020-04-21 07:36:18 +02:00
parent 941d5d7cd9
commit d08bd4e866
13 changed files with 26 additions and 32 deletions

View File

@@ -367,8 +367,8 @@ Module.register("newsfeed",{
},
notificationReceived: function(notification, payload, sender) {
var before = this.activeItem;
if(notification === "ARTICLE_NEXT"){
var before = this.activeItem;
this.activeItem++;
if (this.activeItem >= this.newsItems.length) {
this.activeItem = 0;
@@ -377,7 +377,6 @@ Module.register("newsfeed",{
Log.info(this.name + " - going from article #" + before + " to #" + this.activeItem + " (of " + this.newsItems.length + ")");
this.updateDom(100);
} else if(notification === "ARTICLE_PREVIOUS"){
var before = this.activeItem;
this.activeItem--;
if (this.activeItem < 0) {
this.activeItem = this.newsItems.length - 1;