Skip to content

Commit 2ae2436

Browse files
pentarexfacebook-github-bot
authored andcommitted
iOS: Fix Crash when CameraRoll is getting assets from iCloud and no filename is provided. #13671
Summary: RCTCameraRollManager.m crashes when there is no filename provided for the asset (usually from iCloud). #13671 Tested on real device with iCloud library using the library without and after my fix. It worked after my changes. [IOS] [BUGFIX] [CameraRoll] - Changed the filename if nil to be empty when the asset is coming from iCloud. Closes #17549 Differential Revision: D6710665 Pulled By: hramos fbshipit-source-id: 319865b0a71728798c62ee380e7bee4af584b3e3
1 parent 2afe7d4 commit 2ae2436

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Libraries/CameraRoll/RCTCameraRollManager.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ static void RCTResolvePromise(RCTPromiseResolveBlock resolve,
199199
@"group_name": [group valueForProperty:ALAssetsGroupPropertyName],
200200
@"image": @{
201201
@"uri": uri,
202-
@"filename" : filename,
202+
@"filename" : filename ?: [NSNull null],
203203
@"height": @(dimensions.height),
204204
@"width": @(dimensions.width),
205205
@"isStored": @YES,

0 commit comments

Comments
 (0)