fix: getPhotos crash if there is a quote in album name (#156)

This commit is contained in:
dmydry 2020-03-26 11:01:09 +01:00 committed by GitHub
parent 9fb2f4a75a
commit f51d38783e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -275,7 +275,8 @@ RCT_EXPORT_METHOD(getPhotos:(NSDictionary *)params
PHFetchOptions *const collectionFetchOptions = [PHFetchOptions new]; PHFetchOptions *const collectionFetchOptions = [PHFetchOptions new];
collectionFetchOptions.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"endDate" ascending:NO]]; collectionFetchOptions.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"endDate" ascending:NO]];
if (groupName != nil) { if (groupName != nil) {
collectionFetchOptions.predicate = [NSPredicate predicateWithFormat:[NSString stringWithFormat:@"localizedTitle == '%@'", groupName]]; collectionFetchOptions.predicate = [NSPredicate predicateWithFormat:@"localizedTitle = %@", groupName];
} }
BOOL __block stopCollections_; BOOL __block stopCollections_;