core-components: internal refactor to support revert to TS 4.9
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -95,8 +95,11 @@ export function TabbedCard(props: PropsWithChildren<Props>) {
|
||||
});
|
||||
} else {
|
||||
React.Children.map(children, child => {
|
||||
if (React.isValidElement(child) && child?.props.value === value) {
|
||||
selectedTabContent = child?.props?.children;
|
||||
if (
|
||||
React.isValidElement<{ children?: unknown; value?: unknown }>(child) &&
|
||||
child?.props.value === value
|
||||
) {
|
||||
selectedTabContent = child?.props.children;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user