Skip to content

Commit 395a723

Browse files
committed
fix(dynamic-links, ios): remove double-reject on resolveLink
the iOS firebase-ios-sdk handleUniversalLink completion handler correctly handles all of the error conditions by resolving or rejecting the passed in react-native promise as needed, but was incorrectly then testing success status and rejecting again on unfound links e2e tests were already probing this case to verify correct behavior at the javascript level but the native-level double-reject went unnoticed until now
1 parent e78a329 commit 395a723

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

packages/dynamic-links/ios/RNFBDynamicLinks/RNFBDynamicLinksModule.m

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,7 @@ - (id)init {
206206
}
207207
};
208208

209-
NSURL *linkURL = [NSURL URLWithString:link];
210-
BOOL success = [[FIRDynamicLinks dynamicLinks] handleUniversalLink:linkURL completion:completion];
211-
if (!success) {
212-
[RNFBSharedUtils rejectPromiseWithUserInfo:reject userInfo:(NSMutableDictionary *) @{
213-
@"code": @"not-found",
214-
@"message": @"Dynamic link not found"
215-
}];
216-
}
209+
[[FIRDynamicLinks dynamicLinks] handleUniversalLink:[NSURL URLWithString:link] completion:completion];
217210
}
218211

219212
- (FIRDynamicLinkComponents *)createDynamicLinkComponents:(NSDictionary *)dynamicLinkDict {

0 commit comments

Comments
 (0)