From 6d0272af424fc79e60789a8885460f581f1d1749 Mon Sep 17 00:00:00 2001 From: Mark Wang Date: Tue, 8 Mar 2016 10:15:22 -0800 Subject: [PATCH] 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 --- React/Modules/RCTAlertManager.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/React/Modules/RCTAlertManager.m b/React/Modules/RCTAlertManager.m index b2e7fe0a3..7ab8f49e7 100644 --- a/React/Modules/RCTAlertManager.m +++ b/React/Modules/RCTAlertManager.m @@ -75,7 +75,6 @@ RCT_EXPORT_METHOD(alertWithArgs:(NSDictionary *)args NSString *message = [RCTConvert NSString:args[@"message"]]; UIAlertViewStyle type = [RCTConvert UIAlertViewStyle:args[@"type"]]; NSArray *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; }