Skip to content

Commit 9ae0c2c

Browse files
Himanshu SatijaHimanshu Satija
authored andcommitted
fixed toolbar issue
1 parent e005675 commit 9ae0c2c

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

Components/Widgets/Toolbar.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,24 @@ export default class Toolbar extends NativeBaseComponent {
4646

4747
return(
4848
<View {...this.prepareRootProps()}>
49-
{this.props.children[0] &&
49+
{ !Array.isArray(this.props.children) &&
50+
<View>
51+
{this.props.children}
52+
</View>}
53+
54+
{ Array.isArray(this.props.children) &&
5055
<View >
5156
{this.props.children[0]}
5257
</View>}
53-
{this.props.children[1] &&
58+
{ Array.isArray(this.props.children) &&
5459
<View >
5560
{this.props.children[1]}
5661
</View>}
57-
{this.props.children[2] &&
62+
{ Array.isArray(this.props.children) &&
5863
<View >
59-
{this.props.children[2]}
60-
</View>}
61-
{ !Array.isArray(this.props.children) &&
62-
<View>
63-
{this.props.children}
64+
{this.props.children[2]}
6465
</View>}
66+
6567
</View>
6668
);
6769
}

0 commit comments

Comments
 (0)