Skip to content

Commit

Permalink
fix(dynamic-links, android): null-check intent before calling getDyna…
Browse files Browse the repository at this point in the history
…micLink

firebase-android-sdk requires a `@NonNull` Intent argument to the `getDynamicLink(Intent)`
call, despite the documentation indicating otherwise

Related firebase/firebase-android-sdk#2336
Related invertase/react-native-firebase#5662
  • Loading branch information
mikehardy authored Aug 30, 2021
1 parent 2287ba0 commit 6f049a4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ private void handleGetDynamicLink(final Result result, Uri uri) {
}

private void handleGetInitialDynamicLink(final Result result) {
// If there's no activity, then there's no initial dynamic link.
if (activity == null) {
// If there's no activity or initial Intent, then there's no initial dynamic link.
if (activity == null || activity.getIntent() == null) {
result.success(null);
return;
}
Expand Down

0 comments on commit 6f049a4

Please sign in to comment.