diff --git a/components/vc-table/Cell/index.tsx b/components/vc-table/Cell/index.tsx index da292245a..43172ae79 100644 --- a/components/vc-table/Cell/index.tsx +++ b/components/vc-table/Cell/index.tsx @@ -33,7 +33,7 @@ function inHoverRange(cellStartRow: number, cellRowSpan: number, startRow: numbe function isRenderCell( data: RenderedCell, ): data is RenderedCell { - return data && typeof data === 'object' && !Array.isArray(data) && !isValidElement(data); + return data && typeof data === 'object' && !Array.isArray(data) && !isVNode(data); } export interface CellProps { @@ -245,12 +245,8 @@ export default defineComponent({ } } - // Not crash if final `childNode` is not validate ReactNode - if ( - typeof childNode === 'object' && - !Array.isArray(childNode) && - !isValidElement(childNode) - ) { + // Not crash if final `childNode` is not validate VueNode + if (typeof childNode === 'object' && !Array.isArray(childNode) && !isVNode(childNode)) { childNode = null; }