You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by wa...@apache.org on 2025/04/16 06:50:38 UTC
(echarts) 01/01: fix(custom): fix potential NPE when applying leave transition
This is an automated email from the ASF dual-hosted git repository.
wangzx pushed a commit to branch fix/custom-series-NPE
in repository https://gitbox.apache.org/repos/asf/echarts.git
commit 403db5599a4cf7f96b7fe28bf25361d7cf249d72
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Wed Apr 16 14:50:14 2025 +0800
fix(custom): fix potential NPE when applying leave transition
---
src/animation/customGraphicTransition.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/animation/customGraphicTransition.ts b/src/animation/customGraphicTransition.ts
index a2bf490c5..f1a04131b 100644
--- a/src/animation/customGraphicTransition.ts
+++ b/src/animation/customGraphicTransition.ts
@@ -223,13 +223,13 @@ export function applyLeaveTransition(
// TODO Data index?
const config = getElementAnimationConfig('update', el, elOption, animatableModel, 0);
config.done = () => {
- parent.remove(el);
+ parent && parent.remove(el);
onRemove && onRemove();
};
el.animateTo(leaveToProps, config);
}
else {
- parent.remove(el);
+ parent && parent.remove(el);
onRemove && onRemove();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org