From 4fa57f98daacee3653badee74cb8f1d763e4d551 Mon Sep 17 00:00:00 2001 From: riteshshukla04 Date: Wed, 16 Apr 2025 17:16:32 -0700 Subject: [PATCH] Replaced abort with Default value (#50764) Summary: Fixes https://github.com/facebook/react-native/issues/50740 ## Changelog: [INTERNAL] - App Crash on wrong prop type Pull Request resolved: https://github.com/facebook/react-native/pull/50764 Test Plan: Tested with wrong prop on RN Tester Reviewed By: cipolleschi Differential Revision: D73130916 Pulled By: NickGerleman fbshipit-source-id: 21ffc242e6398509584baf27cf3fb98cbaf2582d --- .../renderer/components/iostextinput/conversions.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/conversions.h b/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/conversions.h index d57d3f24064..bf967317c76 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/conversions.h +++ b/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/conversions.h @@ -34,7 +34,7 @@ inline void fromRawValue( result = AutocapitalizationType::Characters; return; } - abort(); + result = AutocapitalizationType::None; } inline void fromRawValue( @@ -54,7 +54,7 @@ inline void fromRawValue( result = KeyboardAppearance::Dark; return; } - abort(); + result = KeyboardAppearance::Default; } inline void fromRawValue( @@ -122,7 +122,7 @@ inline void fromRawValue( result = ReturnKeyType::Continue; return; } - abort(); + result = ReturnKeyType::Default; } inline void fromRawValue( @@ -146,7 +146,7 @@ inline void fromRawValue( result = TextInputAccessoryVisibilityMode::Always; return; } - abort(); + result = TextInputAccessoryVisibilityMode::Never; } inline void fromRawValue( @@ -214,7 +214,7 @@ inline void fromRawValue( result = KeyboardType::VisiblePassword; return; } - abort(); + result = KeyboardType::Default; } } // namespace facebook::react