1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 11:45:56 +00:00

silence (or fix) a bunch of eslint warnings

This commit is contained in:
Andrew Dolgov
2021-02-12 19:02:09 +03:00
parent ad7842c98a
commit 7f0800537e
14 changed files with 65 additions and 50 deletions

View File

@@ -7,9 +7,9 @@ define(["dojo/_base/declare", "dojo/dom-construct", "dojo/_base/array", "dojo/co
// save state in localStorage instead of cookies
// reference: https://stackoverflow.com/a/27968996
_saveExpandedNodes: function(){
if(this.persist && this.cookieName){
var ary = [];
for(var id in this._openedNodes){
if (this.persist && this.cookieName){
const ary = [];
for (const id in this._openedNodes){
ary.push(id);
}
// Was:
@@ -21,16 +21,16 @@ define(["dojo/_base/declare", "dojo/dom-construct", "dojo/_base/array", "dojo/co
// summary:
// Load in which nodes should be opened automatically
this._openedNodes = {};
if(this.persist && this.cookieName){
if (this.persist && this.cookieName){
// Was:
// var oreo = cookie(this.cookieName);
var oreo = localStorage.getItem(this.cookieName);
let oreo = localStorage.getItem(this.cookieName);
// migrate old data if nothing in localStorage
if(oreo == null || oreo === '') {
if (oreo == null || oreo === '') {
oreo = cookie(this.cookieName);
cookie(this.cookieName, null, { expires: -1 });
}
if(oreo){
if (oreo){
array.forEach(oreo.split(','), function(item){
this._openedNodes[item] = true;
}, this);