Skip to content

Commit

Permalink
fix: handle null orundef values when flexRendering function type comp…
Browse files Browse the repository at this point in the history
…onent in svelte table (#4803)
  • Loading branch information
madisonscott authored Apr 22, 2023
1 parent b9a30a1 commit 2017090
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/svelte-table/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export function flexRender(component: any, props: any) {

if (typeof component === 'function') {
const result = component(props)
if (result === null || result === undefined) return null

if (isSvelteComponent(result)) {
return renderComponent(result, props)
Expand Down

0 comments on commit 2017090

Please sign in to comment.