From 76744d97830781a4f971b0c4d600b23f7f4cbc1d Mon Sep 17 00:00:00 2001 From: John McLear Date: Tue, 22 Dec 2020 14:54:21 +0000 Subject: [PATCH] lint: AttributePool.js --- src/static/js/AttributePool.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/static/js/AttributePool.js b/src/static/js/AttributePool.js index 78d3e7c5b..8f001f84a 100644 --- a/src/static/js/AttributePool.js +++ b/src/static/js/AttributePool.js @@ -1,3 +1,4 @@ +'use strict'; /** * This code represents the Attribute Pool Object of the original Etherpad. * 90% of the code is still like in the original Etherpad @@ -69,7 +70,7 @@ AttributePool.prototype.getAttribValue = function (num) { }; AttributePool.prototype.eachAttrib = function (func) { - for (const n in this.numToAttrib) { + for (const n of this.numToAttrib) { const pair = this.numToAttrib[n]; func(pair[0], pair[1]); } @@ -86,7 +87,7 @@ AttributePool.prototype.fromJsonable = function (obj) { this.numToAttrib = obj.numToAttrib; this.nextNum = obj.nextNum; this.attribToNum = {}; - for (const n in this.numToAttrib) { + for (const n of this.numToAttrib) { this.attribToNum[String(this.numToAttrib[n])] = Number(n); } return this;