Skip to content

Commit 6652007

Browse files
committed
fix: flow types
1 parent 507e248 commit 6652007

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/parser/parseReactElement.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ const getReactElementDisplayName = (element: ReactElement<*>): string => {
7171
case isSuspense(element):
7272
return 'Suspense';
7373
default:
74-
return element;
74+
// this is "unknown" case and will most likely result in `[object Object]`
75+
// it's fine though as we can't display anything meaningful anyway here
76+
return String(element);
7577
}
7678
};
7779

0 commit comments

Comments
 (0)