Skip to content

Commit

Permalink
checked if array and otherwise return undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
eljefe223 committed Mar 18, 2020
1 parent 40e2db0 commit d721c05
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/fast-components-react-base/src/tabs/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,11 @@ class Tabs extends Foundation<TabsHandledProps, TabsUnhandledProps, TabsState> {
* Can remove if below gets merged in.
* https://github.com/preactjs/preact-compat/pull/461
*/
private filterChildren(nodes: any): React.ReactNode {
if (!isNil(nodes)) {
private filterChildren(nodes: React.ReactNode): React.ReactNode {
if (Array.isArray(nodes)) {
return nodes.filter(Boolean);
} else {
return undefined;
}
}

Expand Down

0 comments on commit d721c05

Please sign in to comment.