Skip to content
This repository has been archived by the owner on Feb 15, 2019. It is now read-only.

Commit

Permalink
Fix for isPrototypeOf not applying to itself
Browse files Browse the repository at this point in the history
  • Loading branch information
dantman committed Nov 16, 2016
1 parent d681025 commit 598b908
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/drawer/ExNavigationDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ class ExNavigationDrawer extends PureComponent<any, Props, State> {
_parseDrawerItems(props) {
const drawerItems = Children.map(props.children, (child, index) => {
invariant(
child.type instanceof Object && ExNavigationDrawerChild.prototype.isPrototypeOf(child.type.prototype),
child.type.prototype === ExNavigationDrawerChild.prototype ||
child.type instanceof Object && ExNavigationDrawerChild.prototype.isPrototypeOf(child.type.prototype),
'All children of DrawerNavigation must be DrawerNavigationChild descendant components.'
);

Expand Down

0 comments on commit 598b908

Please sign in to comment.