-
-
Notifications
You must be signed in to change notification settings - Fork 445
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tabs): Correctly handle children of type string (#211)
- Loading branch information
1 parent
cd3ac28
commit 6fd4002
Showing
3 changed files
with
80 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
export function isTab(el) { | ||
return el.type.tabsRole === 'Tab'; | ||
return el.type && el.type.tabsRole === 'Tab'; | ||
} | ||
|
||
export function isTabPanel(el) { | ||
return el.type.tabsRole === 'TabPanel'; | ||
return el.type && el.type.tabsRole === 'TabPanel'; | ||
} | ||
|
||
export function isTabList(el) { | ||
return el.type.tabsRole === 'TabList'; | ||
return el.type && el.type.tabsRole === 'TabList'; | ||
} |