Use let instead of var in objects.js
This commit is contained in:
parent
b55264b24f
commit
37912b3a3f
1 changed files with 7 additions and 7 deletions
|
@ -45,7 +45,7 @@ Objects.prototype.pick = function (category, last) {
|
|||
}
|
||||
|
||||
Objects.prototype.pop = function (objectName) {
|
||||
var self = this
|
||||
let self = this
|
||||
utils.getKeysFromHash(this.container).forEach(function (category) {
|
||||
self.container[category].forEach(function (obj) {
|
||||
if (obj.name === objectName) {
|
||||
|
@ -56,8 +56,8 @@ Objects.prototype.pop = function (objectName) {
|
|||
}
|
||||
|
||||
Objects.prototype.contains = function (categoryNames) {
|
||||
var categories = []
|
||||
var self = this
|
||||
let categories = []
|
||||
let self = this
|
||||
categoryNames.forEach(function (name) {
|
||||
if (self.has(name)) {
|
||||
categories.push(name)
|
||||
|
@ -83,13 +83,13 @@ Objects.prototype.has = function (category) {
|
|||
}
|
||||
|
||||
Objects.prototype.valid = function () {
|
||||
var items = []
|
||||
var self = this
|
||||
let items = []
|
||||
let self = this
|
||||
utils.common.getKeysFromHash(self.container).forEach(function (category) {
|
||||
self.check(category)
|
||||
})
|
||||
utils.common.getKeysFromHash(self.container).forEach(function (category) {
|
||||
for (var i = 0; i < self.container[category].length; i++) {
|
||||
for (let i = 0; i < self.container[category].length; i++) {
|
||||
items.push(self.container[category][i].name)
|
||||
}
|
||||
})
|
||||
|
@ -97,7 +97,7 @@ Objects.prototype.valid = function () {
|
|||
}
|
||||
|
||||
Objects.prototype.check = function (category) {
|
||||
var self = this
|
||||
let self = this
|
||||
self.container[category].forEach(function (object) {
|
||||
try {
|
||||
let x = /* frame.contentWindow. */ eval(object.name) // eslint-disable-line no-eval
|
||||
|
|
Loading…
Reference in a new issue