Skip to content

Commit

Permalink
Set title to Unknown if it's nil
Browse files Browse the repository at this point in the history
  • Loading branch information
FrikkieSnyman committed Nov 15, 2019
1 parent c543fb4 commit a7bb4d0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ios/RNPhotosFramework/PHCollectionService.m
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ + (NSMutableDictionary *)generateAlbumResponseFromCollection:(PHCollection *)col
}
}

[albumDictionary setObject:collection.localizedTitle forKey:@"title"];
NSString *title = collection.localizedTitle;
if (!title) {
title = @"Unknown";
}
[albumDictionary setObject:title forKey:@"title"];
[albumDictionary setObject:collection.localIdentifier forKey:@"localIdentifier"];

NSMutableArray *permittedOperations = [NSMutableArray arrayWithCapacity:7];
Expand Down

0 comments on commit a7bb4d0

Please sign in to comment.