Function
renderComponent
(content: ReactNode | null | undefined, fallbackComponent: ReactNode)
Source from the content-addressed store, hash-verified
| 113 | } |
| 114 | |
| 115 | export function renderComponent(content: ReactNode | null | undefined, fallbackComponent: ReactNode): ReactNode | null { |
| 116 | if (content === null) return null |
| 117 | return content ?? fallbackComponent |
| 118 | } |
| 119 | |
| 120 | export function isNil(value: unknown): value is null | undefined { |
| 121 | return typeof value === 'undefined' || value === null |
Tested by
no test coverage detected