Fix "Cannot read property 'anchor' of undefined"
replace unnecessary filter with for loop and break
This commit is contained in:
+6
-5
@@ -610,11 +610,12 @@ class View extends BaseObject {
|
|||||||
animationCallback(series[0].callback, false);
|
animationCallback(series[0].callback, false);
|
||||||
}
|
}
|
||||||
if (!anchor) {
|
if (!anchor) {
|
||||||
const animations = series.filter(function(animation) {
|
for (let j = 0, jj = series.length; j < jj; ++j) {
|
||||||
return !animation.complete;
|
const animation = series[j];
|
||||||
});
|
if (!animation.complete) {
|
||||||
if (animations.length > 0) {
|
anchor = animation.anchor;
|
||||||
anchor = animations[0].anchor;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user