Skip to content

Commit bbcb13c

Browse files
committed
do not set bar button items if dict count is 0
1 parent 493e79a commit bbcb13c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ios/RNSScreenStackHeaderConfig.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,11 +704,11 @@ + (void)updateViewController:(UIViewController *)vc
704704
navitem.title = config.title;
705705

706706
// Set leftBarButtonItems if provided
707-
if (config.headerLeftBarButtonItems) {
707+
if (config.headerLeftBarButtonItems.count > 0) {
708708
navitem.leftBarButtonItems = [config barButtonItemsFromDictionaries:config.headerLeftBarButtonItems];
709709
}
710710
// Set rightBarButtonItems if provided
711-
if (config.headerRightBarButtonItems) {
711+
if (config.headerRightBarButtonItems.count > 0) {
712712
navitem.rightBarButtonItems = [config barButtonItemsFromDictionaries:config.headerRightBarButtonItems];
713713
}
714714

0 commit comments

Comments
 (0)