Skip to content

Commit 6f049a4

Browse files
authored
fix(dynamic-links, android): null-check intent before calling getDynamicLink
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
1 parent 2287ba0 commit 6f049a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/firebase_dynamic_links/android/src/main/java/io/flutter/plugins/firebasedynamiclinks/FirebaseDynamicLinksPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ private void handleGetDynamicLink(final Result result, Uri uri) {
209209
}
210210

211211
private void handleGetInitialDynamicLink(final Result result) {
212-
// If there's no activity, then there's no initial dynamic link.
213-
if (activity == null) {
212+
// If there's no activity or initial Intent, then there's no initial dynamic link.
213+
if (activity == null || activity.getIntent() == null) {
214214
result.success(null);
215215
return;
216216
}

0 commit comments

Comments
 (0)