Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/animation/morphTransitionHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export function applyMorphAnimation(
}

const updateAnimationCfg = getAnimationConfig('update', seriesModel, dataIndex);
if (!(updateAnimationCfg.duration > 0)) {
if (!(updateAnimationCfg && updateAnimationCfg.duration > 0)) {
return;
}
const animationDelay = (seriesModel.getModel('universalTransition') as Model<UniversalTransitionOption>)
Expand Down
4 changes: 2 additions & 2 deletions src/animation/universalTransition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function stopAnimation(el: Element) {
}
function animateElementStyles(el: Element, dataIndex: number, seriesModel: SeriesModel) {
const animationConfig = getAnimationConfig('update', seriesModel, dataIndex);
el.traverse(child => {
animationConfig && el.traverse(child => {
if (child instanceof Displayable) {
const oldStyle = getOldStyle(child);
if (oldStyle) {
Expand Down Expand Up @@ -412,7 +412,7 @@ function transitionBetween(
const seriesModel = data.hostModel as SeriesModel;
const view = seriesModel && api.getViewOfSeriesModel(seriesModel as SeriesModel);
const animationCfg = getAnimationConfig('update', seriesModel, 0); // use 0 index.
if (view && seriesModel.isAnimationEnabled() && animationCfg.duration > 0) {
if (view && seriesModel.isAnimationEnabled() && animationCfg && animationCfg.duration > 0) {
view.group.traverse(el => {
if (el instanceof Path && !el.animators.length) {
// We can't accept there still exists element that has no animation
Expand Down