1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Fix 14802 - Prevent children error in page container (#14809)

This commit is contained in:
David Walsh 2022-06-21 18:38:39 -05:00 committed by GitHub
parent b68aee1bef
commit 6ffd0ce063
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,9 +74,7 @@ export default class PageContainer extends PureComponent {
children = children.filter(Boolean); children = children.filter(Boolean);
const { activeTabIndex } = this.state; const { activeTabIndex } = this.state;
return children[activeTabIndex] return (children[activeTabIndex] || children[0]).props.children;
? children[activeTabIndex].props.children
: children.props.children;
} }
renderContent() { renderContent() {