mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
clear up for..in loop eslint errors
This commit is contained in:
parent
f975c09123
commit
9c8b0cf118
@ -25,10 +25,13 @@ const Common = {
|
|||||||
|
|
||||||
extend: function(target) {
|
extend: function(target) {
|
||||||
this.each(ARR_SLICE.call(arguments, 1), function(obj) {
|
this.each(ARR_SLICE.call(arguments, 1), function(obj) {
|
||||||
for (const key in obj) {
|
if (!this.isUndefined(obj)) {
|
||||||
if (!this.isUndefined(obj[key])) {
|
const keys = Object.keys(obj);
|
||||||
target[key] = obj[key];
|
keys.forEach(function(key) {
|
||||||
}
|
if (!this.isUndefined(obj[key])) {
|
||||||
|
target[key] = obj[key];
|
||||||
|
}
|
||||||
|
}.bind(this));
|
||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
@ -37,10 +40,13 @@ const Common = {
|
|||||||
|
|
||||||
defaults: function(target) {
|
defaults: function(target) {
|
||||||
this.each(ARR_SLICE.call(arguments, 1), function(obj) {
|
this.each(ARR_SLICE.call(arguments, 1), function(obj) {
|
||||||
for (const key in obj) {
|
if (!this.isUndefined(obj)) {
|
||||||
if (this.isUndefined(target[key])) {
|
const keys = Object.keys(obj);
|
||||||
target[key] = obj[key];
|
keys.forEach(function(key) {
|
||||||
}
|
if (this.isUndefined(target[key])) {
|
||||||
|
target[key] = obj[key];
|
||||||
|
}
|
||||||
|
}.bind(this));
|
||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
@ -74,11 +80,14 @@ const Common = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (const key in obj) {
|
if (this.isUndefined(obj)) return;
|
||||||
|
|
||||||
|
const keys = Object.keys(obj);
|
||||||
|
keys.forEach(function(key) {
|
||||||
if (itr.call(scope, obj[key], key) === this.BREAK) {
|
if (itr.call(scope, obj[key], key) === this.BREAK) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}.bind(this));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user