summaryrefslogtreecommitdiff
path: root/modules/script
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2020-08-15 12:08:23 -0700
committerPhilip Chimento <philip.chimento@gmail.com>2020-08-30 19:38:19 -0700
commit0f3c532b818f302e18bef5838986c4deb6cc475e (patch)
tree7884cf183b9262ef2a322a9470fd0689570b2964 /modules/script
parent9d39e6874423d2258600217f237caa95c168e187 (diff)
downloadgjs-0f3c532b818f302e18bef5838986c4deb6cc475e.tar.gz
maint: Add more eslint rules for restricted syntax
We do want people to stop using Lang.copyProperties. In addition, 'x instanceof Array' is not correct, use Array.isArray() instead.
Diffstat (limited to 'modules/script')
-rw-r--r--modules/script/tweener/tweener.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/script/tweener/tweener.js b/modules/script/tweener/tweener.js
index 540d4853..11a909d2 100644
--- a/modules/script/tweener/tweener.js
+++ b/modules/script/tweener/tweener.js
@@ -484,7 +484,7 @@ function _addTweenOrCaller(target, tweeningParameters, isCaller) {
return false;
var scopes; // List of objects to tween
- if (target instanceof Array) {
+ if (Array.isArray(target)) {
// The first argument is an array
scopes = target.concat(); // XXX: To copy the array I guess
} else {
@@ -770,7 +770,7 @@ function _affectTweensWithFunction(func, args) {
var affected = false;
var scopes;
- if (scope instanceof Array)
+ if (Array.isArray(scope))
scopes = scope.concat();
else
scopes = new Array(scope);