diff --git a/src/chart/custom/CustomView.ts b/src/chart/custom/CustomView.ts index 215087b72b..ad282ed9b0 100644 --- a/src/chart/custom/CustomView.ts +++ b/src/chart/custom/CustomView.ts @@ -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