summaryrefslogtreecommitdiff
path: root/js/FeedTree.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-12 19:02:09 +0300
committerAndrew Dolgov <[email protected]>2021-02-12 19:02:09 +0300
commit7f0800537e8268dcbc4fce19f38fcbaa3d78a1cd (patch)
treed80b1c1a4194265c4c340661a1388f77c2a048c1 /js/FeedTree.js
parentad7842c98af21bf400c0f347455a3a8432c01140 (diff)
silence (or fix) a bunch of eslint warnings
Diffstat (limited to 'js/FeedTree.js')
-rwxr-xr-xjs/FeedTree.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/js/FeedTree.js b/js/FeedTree.js
index c61d8a50f..26c1c916c 100755
--- a/js/FeedTree.js
+++ b/js/FeedTree.js
@@ -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);