Skip to content

Commit e1eb992

Browse files
authored
fix(ios, storage): handle nil file extension from ios14 M1 emulators (#4676)
1 parent 50ecf38 commit e1eb992

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/storage/ios/RNFBStorage/RNFBStorageCommon.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ + (NSString *)mimeTypeForPath:(NSString *)localFilePath {
6363
(__bridge CFStringRef) [localFilePath pathExtension],
6464
NULL);
6565
CFStringRef mimeType = UTTypeCopyPreferredTagWithClass(UTI, kUTTagClassMIMEType);
66-
CFRelease(UTI);
66+
if (UTI) { CFRelease(UTI); }
6767

6868
if (!mimeType) {
6969
return @"application/octet-stream";

0 commit comments

Comments
 (0)