Skip to content

Commit 4cea895

Browse files
committed
checked if array and otherwise return undefined
1 parent 101bca8 commit 4cea895

File tree

1 file changed

+4
-2
lines changed
  • packages/fast-components-react-base/src/tabs

1 file changed

+4
-2
lines changed

packages/fast-components-react-base/src/tabs/tabs.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -431,9 +431,11 @@ class Tabs extends Foundation<TabsHandledProps, TabsUnhandledProps, TabsState> {
431431
* Can remove if below gets merged in.
432432
* https://github.com/preactjs/preact-compat/pull/461
433433
*/
434-
private filterChildren(nodes: any): React.ReactNode {
435-
if (!isNil(nodes)) {
434+
private filterChildren(nodes: React.ReactNode): React.ReactNode {
435+
if (Array.isArray(nodes)) {
436436
return nodes.filter(Boolean);
437+
} else {
438+
return undefined;
437439
}
438440
}
439441

0 commit comments

Comments
 (0)