lint: attributepool.js

This commit is contained in:
John McLear 2020-12-22 14:41:03 +00:00
parent 46dc943101
commit 75ffe40c09
1 changed files with 4 additions and 2 deletions

View File

@ -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;