Skip to content

Commit 22d832f

Browse files
committed
RCTFBSDKAppInviteDialog: Return NSNull in callback instead of NULL
1 parent 0d60d76 commit 22d832f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

react-native-fbsdkshare/iOS/RCTFBSDKAppInviteDialog.m

+5-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ - (void)appInviteDialog:(FBSDKAppInviteDialog *)appInviteDialog didCompleteWithR
7777
if ([results[@"completionGesture"] isEqualToString:@"cancel"]) {
7878
_showCallback(@[[NSNull null], @{@"isCancelled": @YES}]);
7979
} else {
80-
_showCallback(@[[NSNull null], results]);
80+
if (results == NULL) {
81+
_showCallback(@[[NSNull null], [NSNull null]]);
82+
} else {
83+
_showCallback(@[[NSNull null], results]);
84+
}
8185
}
8286
_showCallback = nil;
8387
}

0 commit comments

Comments
 (0)