Skip to content

Commit 2017090

Browse files
authored
fix: handle null orundef values when flexRendering function type component in svelte table (#4803)
1 parent b9a30a1 commit 2017090

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/svelte-table/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export function flexRender(component: any, props: any) {
5353

5454
if (typeof component === 'function') {
5555
const result = component(props)
56+
if (result === null || result === undefined) return null
5657

5758
if (isSvelteComponent(result)) {
5859
return renderComponent(result, props)

0 commit comments

Comments
 (0)