Skip to content

Commit 4fa57f9

Browse files
riteshshukla04facebook-github-bot
authored andcommitted
Replaced abort with Default value (#50764)
Summary: Fixes #50740 ## Changelog: [INTERNAL] - App Crash on wrong prop type Pull Request resolved: #50764 Test Plan: Tested with wrong prop on RN Tester Reviewed By: cipolleschi Differential Revision: D73130916 Pulled By: NickGerleman fbshipit-source-id: 21ffc242e6398509584baf27cf3fb98cbaf2582d
1 parent 986bcdb commit 4fa57f9

File tree

1 file changed

+5
-5
lines changed
  • packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput

1 file changed

+5
-5
lines changed

Diff for: packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/conversions.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ inline void fromRawValue(
3434
result = AutocapitalizationType::Characters;
3535
return;
3636
}
37-
abort();
37+
result = AutocapitalizationType::None;
3838
}
3939

4040
inline void fromRawValue(
@@ -54,7 +54,7 @@ inline void fromRawValue(
5454
result = KeyboardAppearance::Dark;
5555
return;
5656
}
57-
abort();
57+
result = KeyboardAppearance::Default;
5858
}
5959

6060
inline void fromRawValue(
@@ -122,7 +122,7 @@ inline void fromRawValue(
122122
result = ReturnKeyType::Continue;
123123
return;
124124
}
125-
abort();
125+
result = ReturnKeyType::Default;
126126
}
127127

128128
inline void fromRawValue(
@@ -146,7 +146,7 @@ inline void fromRawValue(
146146
result = TextInputAccessoryVisibilityMode::Always;
147147
return;
148148
}
149-
abort();
149+
result = TextInputAccessoryVisibilityMode::Never;
150150
}
151151

152152
inline void fromRawValue(
@@ -214,7 +214,7 @@ inline void fromRawValue(
214214
result = KeyboardType::VisiblePassword;
215215
return;
216216
}
217-
abort();
217+
result = KeyboardType::Default;
218218
}
219219

220220
} // namespace facebook::react

0 commit comments

Comments
 (0)