diff --git a/lib/utils.js b/lib/utils.js index 8a15861..5f0b58c 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -134,5 +134,11 @@ export const mergeViewStyle = (style, defaultStyle) => { * @returns {JSX.Element|[]|*} */ export const createElement = (Component) => { - return React.isValidElement(Component) ? Component : ; + return Component != null ? ( + React.isValidElement(Component) ? ( + Component + ) : ( + + ) + ) : null; };