From aeab9cc0ad5dda8f04dd8aea3c80eed17689d049 Mon Sep 17 00:00:00 2001 From: John McLear Date: Tue, 22 Dec 2020 15:01:12 +0000 Subject: [PATCH] lint: attributepool fix incorrect commit --- src/static/js/AttributePool.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/static/js/AttributePool.js b/src/static/js/AttributePool.js index 8f001f84a..79849f4d3 100644 --- a/src/static/js/AttributePool.js +++ b/src/static/js/AttributePool.js @@ -70,7 +70,7 @@ AttributePool.prototype.getAttribValue = function (num) { }; AttributePool.prototype.eachAttrib = function (func) { - for (const n of this.numToAttrib) { + for (const n of Object.keys(this.numToAttrib)) { const pair = this.numToAttrib[n]; func(pair[0], pair[1]); } @@ -87,7 +87,7 @@ AttributePool.prototype.fromJsonable = function (obj) { this.numToAttrib = obj.numToAttrib; this.nextNum = obj.nextNum; this.attribToNum = {}; - for (const n of this.numToAttrib) { + for (const n of Object.keys(this.numToAttrib)) { this.attribToNum[String(this.numToAttrib[n])] = Number(n); } return this;