typescript fixes, replayer close error, show page toggle fix.
This commit is contained in:
1 parent
10dced1049
commit
f3ce0e64ca
15 files changed
+67
-28
No files matched your search
+4
-2
@@ -8,9 +8,11 @@ import {
|
||||
type ReactNode,
|
||||
} from 'react';
|
||||
|
||||
type ReactElementWithChildren = ReactElement<{ children?: ReactNode }>;
|
||||
|
||||
export function getFragmentChildren(children: ReactNode) {
|
||||
return (children as ReactElement)?.type === Fragment
|
||||
? (children as ReactElement).props.children
|
||||
return (children as ReactElementWithChildren)?.type === Fragment
|
||||
? (children as ReactElementWithChildren).props.children
|
||||
: children;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user