From 75ffe40c09126372a74faf020d1778315cc6fd83 Mon Sep 17 00:00:00 2001 From: John McLear Date: Tue, 22 Dec 2020 14:41:03 +0000 Subject: [PATCH] lint: attributepool.js --- src/static/js/AttributePool.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/static/js/AttributePool.js b/src/static/js/AttributePool.js index 78d3e7c5..541d633e 100644 --- a/src/static/js/AttributePool.js +++ b/src/static/js/AttributePool.js @@ -1,3 +1,5 @@ +'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 +71,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 +88,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;