浏览代码

Fixes crash when button.title is undefined

yogevbd 6 年前
父节点
当前提交
ce24fcdc67
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      lib/ios/RNNNavigationButtons.m

+ 1
- 1
lib/ios/RNNNavigationButtons.m 查看文件

63
 
63
 
64
 -(RNNUIBarButtonItem*)buildButton: (NSDictionary*)dictionary defaultStyle:(RNNButtonOptions *)defaultStyle {
64
 -(RNNUIBarButtonItem*)buildButton: (NSDictionary*)dictionary defaultStyle:(RNNButtonOptions *)defaultStyle {
65
 	NSString* buttonId = dictionary[@"id"];
65
 	NSString* buttonId = dictionary[@"id"];
66
-	NSString* title = [self getValue:dictionary[@"text"] withDefault:defaultStyle.text];
66
+	NSString* title = [self getValue:dictionary[@"text"] withDefault:[defaultStyle.text getWithDefaultValue:@""]];
67
 	NSDictionary* component = dictionary[@"component"];
67
 	NSDictionary* component = dictionary[@"component"];
68
 	
68
 	
69
 	if (!buttonId) {
69
 	if (!buttonId) {