Skip to content

Commit ce41dd1

Browse files
committed
Allow non-matching textContentTypes to pass through
1 parent cbfbb16 commit ce41dd1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Libraries/Text/TextInput/RCTBaseTextInputView.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ - (void)setTextContentType:(NSString *)type
239239
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 120000 /* __IPHONE_12_0 */
240240
if (@available(iOS 12.0, *)) {
241241
NSDictionary<NSString *, NSString *> * iOS12extras = @{@"newPassword": UITextContentTypeNewPassword,
242-
@"oneTimeCode": UITextContentTypeOneTimeCode};
242+
@"oneTimeCode": UITextContentTypeOneTimeCode};
243243

244244
NSMutableDictionary<NSString *, NSString *> * iOS12baseMap = [contentTypeMap mutableCopy];
245245
[iOS12baseMap addEntriesFromDictionary:iOS12extras];
@@ -251,7 +251,7 @@ - (void)setTextContentType:(NSString *)type
251251

252252
// Setting textContentType to an empty string will disable any
253253
// default behaviour, like the autofill bar for password inputs
254-
self.backedTextInputView.textContentType = type ? contentTypeMap[type] : type;
254+
self.backedTextInputView.textContentType = contentTypeMap[type] ?: type;
255255
}
256256
#endif
257257
}

0 commit comments

Comments
 (0)