mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
fix crash
Summary: blocks don't capture C++ objects so this will would crash Reviewed By: sammy-SC, cipolleschi Differential Revision: D53572123 fbshipit-source-id: 323f29c30d99616080aef6b0a895df4599788395
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2ca7bec0c2
commit
b796cda38b
@@ -84,6 +84,7 @@ RCT_EXPORT_METHOD(alertWithArgs : (JS::NativeAlertManager::Args &)args callback
|
||||
NSString *destructiveButtonKey = [RCTConvert NSString:args.destructiveButtonKey()];
|
||||
NSString *preferredButtonKey = [RCTConvert NSString:args.preferredButtonKey()];
|
||||
UIKeyboardType keyboardType = [RCTConvert UIKeyboardType:args.keyboardType()];
|
||||
UIUserInterfaceStyle userInterfaceStyle = [RCTConvert UIUserInterfaceStyle:args.userInterfaceStyle()];
|
||||
|
||||
if (!title && !message) {
|
||||
RCTLogError(@"Must specify either an alert title, or message, or both");
|
||||
@@ -108,7 +109,6 @@ RCT_EXPORT_METHOD(alertWithArgs : (JS::NativeAlertManager::Args &)args callback
|
||||
message:nil
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIUserInterfaceStyle userInterfaceStyle = [RCTConvert UIUserInterfaceStyle:args.userInterfaceStyle()];
|
||||
alertController.overrideUserInterfaceStyle = userInterfaceStyle;
|
||||
|
||||
switch (type) {
|
||||
|
||||
Reference in New Issue
Block a user