diff --git a/ios/RNPhotosFramework/PHCollectionService.m b/ios/RNPhotosFramework/PHCollectionService.m index e0a65f5..ece85ee 100644 --- a/ios/RNPhotosFramework/PHCollectionService.m +++ b/ios/RNPhotosFramework/PHCollectionService.m @@ -133,7 +133,7 @@ +(NSMutableDictionary *)generateAlbumsResponseFromParams:(NSDictionary *)params + (NSMutableDictionary *)generateAlbumResponseFromCollection:(PHCollection *)collection numberOfPreviewAssets:(int)numberOfPreviewAssets countType:(RNPFAssetCountType)countType includeMetadata:(BOOL)includeMetadata includeResourcesMetadata:(BOOL)resourcesMetadata cacheAssets:(BOOL)cacheAssets assetFetchParams:(NSDictionary *)assetFetchParams { NSMutableDictionary *albumDictionary = [NSMutableDictionary new]; - + if([collection isKindOfClass:[PHAssetCollection class]]) { PHAssetCollection *phAssetCollection = (PHAssetCollection *)collection; PHAssetCollectionType albumType = [phAssetCollection assetCollectionType]; @@ -186,8 +186,8 @@ + (NSMutableDictionary *)generateAlbumResponseFromCollection:(PHCollection *)col } } - - [albumDictionary setObject:collection.localizedTitle forKey:@"title"]; + + [albumDictionary setObject:ObjectOrNull(collection.localizedTitle) forKey:@"title"]; [albumDictionary setObject:collection.localIdentifier forKey:@"localIdentifier"]; NSMutableArray *permittedOperations = [NSMutableArray arrayWithCapacity:7];