Skip to content

Commit 98c8b87

Browse files
committed
Update ReactNativeBlobUtil.mm
ensuring readfile calls with ascii encoder options don't fall through the utf8 else case
1 parent 4cc7be6 commit 98c8b87

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ios/ReactNativeBlobUtil/ReactNativeBlobUtil.mm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,8 +680,7 @@ - (void)readFile:(NSString *)path
680680
}
681681
if([encoding isEqualToString:@"ascii"]) {
682682
resolve((NSMutableArray *)content);
683-
}
684-
if([encoding isEqualToString:@"base64"]) {
683+
} else if([encoding isEqualToString:@"base64"]) {
685684
resolve([content base64EncodedStringWithOptions:0]);
686685
} else {
687686
resolve([[NSString alloc] initWithData:content encoding:NSUTF8StringEncoding]);

0 commit comments

Comments
 (0)