Skip to content

Commit

Permalink
fix(custom): set ignore only if old child exists (apache#17450)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovilia authored Aug 1, 2022
1 parent 8e4b5f0 commit 715e1da
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/chart/custom/CustomView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1340,6 +1340,13 @@ function mergeChildren(
);
}
else {
if (__DEV__) {
assert(
oldChild,
'renderItem should not return a group containing elements'
+ ' as null/undefined/{} if they do not exist before.'
);
}
// If the new element option is null, it means to remove the old
// element. But we cannot really remove the element from the group
// directly, because the element order may not be stable when this
Expand Down

0 comments on commit 715e1da

Please sign in to comment.