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:
Mark Wang 2016-03-08 10:15:22 -08:00 committed by Facebook Github Bot 6
parent 6e3710f36b
commit 6d0272af42

View File

@ -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;
}