We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 09074af + eaa1c1a commit cd481afCopy full SHA for cd481af
1 file changed
src/utils/transpile/errorBoundary.js
@@ -7,7 +7,11 @@ const errorBoundary = (Element, errorCallback) => {
7
}
8
9
render() {
10
- return typeof Element === 'function' ? <Element /> : Element;
+ return typeof Element === 'function' ? (
11
+ <Element />
12
+ ) : React.isValidElement(Element) ? (
13
+ Element
14
+ ) : null;
15
16
};
17
0 commit comments