Skip to content

Commit f35829e

Browse files
committed
2.0.8 hotfix
1 parent d0301a7 commit f35829e

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

build/zrender-original.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9036,7 +9036,9 @@ define('zrender/Group',['require','./tool/guid','./tool/util','./mixin/Transform
90369036
Group.prototype.removeChild = function(child) {
90379037
var idx = util.indexOf(this._children, child);
90389038

9039-
this._children.splice(idx, 1);
9039+
if (idx >= 0) {
9040+
this._children.splice(idx, 1);
9041+
}
90409042
child.parent = null;
90419043

90429044
if (this._storage) {
@@ -11041,7 +11043,10 @@ define(
1104111043

1104211044
var animator = this.animation.animate(target, { loop: loop })
1104311045
.done(function () {
11044-
animators.splice(el.__animators.indexOf(animator), 1);
11046+
var idx = util.indexOf(el.__animators, animator);
11047+
if (idx >= 0) {
11048+
animators.splice(idx, 1);
11049+
}
1104511050
if (animators.length === 0) {
1104611051
// 从animatingElements里移除
1104711052
var idx = util.indexOf(animatingElements, el);
@@ -11070,7 +11075,10 @@ define(
1107011075
}
1107111076
if (len > 0) {
1107211077
var animatingElements = this.animatingElements;
11073-
animatingElements.splice(animatingElements.indexOf(el), 1);
11078+
var idx = util.indexOf(animatingElements, el);
11079+
if (idx >= 0) {
11080+
animatingElements.splice(idx, 1);
11081+
}
1107411082
}
1107511083

1107611084
animators.length = 0;

build/zrender.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)