Skip to content

Commit 415c200

Browse files
fix(dynamic-links, android): check for null currentIntent in getInitialLink to avoid crash (#5662)
1 parent 41c0107 commit 415c200

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/dynamic-links/android/src/main/java/io/invertase/firebase/dynamiclinks/ReactNativeFirebaseDynamicLinksModule.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ public void getInitialLink(Promise promise) {
163163
}
164164

165165
Intent currentIntent = currentActivity.getIntent();
166+
if (currentIntent == null) {
167+
promise.resolve(null);
168+
return;
169+
}
170+
166171
// Verify if the app was resumed from the Overview (history) screen.
167172
launchedFromHistory =
168173
(currentIntent != null)

0 commit comments

Comments
 (0)