mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 01:40:08 +00:00
Fix potential unused variable error
Summary: If we're compiling with `-Wunused-variable` and `__IPHONE_OS_VERSION_MIN_REQUIRED` >= 8.0, this would cause an build error. Reviewed By: javache, majak Differential Revision: D3019904 fb-gh-sync-id: d4482d7d070f8d896acd44b03ebc70bacd9f2f3f shipit-source-id: d4482d7d070f8d896acd44b03ebc70bacd9f2f3f
This commit is contained in:
parent
6e3710f36b
commit
6d0272af42
@ -75,7 +75,6 @@ RCT_EXPORT_METHOD(alertWithArgs:(NSDictionary *)args
|
||||
NSString *message = [RCTConvert NSString:args[@"message"]];
|
||||
UIAlertViewStyle type = [RCTConvert UIAlertViewStyle:args[@"type"]];
|
||||
NSArray<NSDictionary *> *buttons = [RCTConvert NSDictionaryArray:args[@"buttons"]];
|
||||
NSString *defaultValue = [RCTConvert NSString:args[@"defaultValue"]];
|
||||
NSString *cancelButtonKey = [RCTConvert NSString:args[@"cancelButtonKey"]];
|
||||
NSString *destructiveButtonKey = [RCTConvert NSString:args[@"destructiveButtonKey"]];
|
||||
|
||||
@ -113,6 +112,7 @@ RCT_EXPORT_METHOD(alertWithArgs:(NSDictionary *)args
|
||||
alertView.message = message;
|
||||
|
||||
if (type != UIAlertViewStyleDefault) {
|
||||
NSString *defaultValue = [RCTConvert NSString:args[@"defaultValue"]];
|
||||
[alertView textFieldAtIndex:0].text = defaultValue;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user