Skip to content

Commit 988e149

Browse files
fix: skip if there's no action or category (#2432)
* fix: skip if there's no `action` or `category` * fix: indentation
1 parent 7806690 commit 988e149

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

packages/cli-platform-android/src/config/__fixtures__/files/AndroidManifest-className.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
<application android:name=".MainApplication">
55
<activity android:name="com.example.ExampleAppActivity">
6+
<intent-filter>
7+
<action android:name="android.intent.action.VIEW" />
8+
</intent-filter>
69
<intent-filter>
710
<action android:name="android.intent.action.MAIN" />
811
<category android:name="android.intent.category.LAUNCHER" />

packages/cli-platform-android/src/config/getMainActivity.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ export default function getMainActivity(manifestPath: string): string | null {
5454
return intentFilters.find((intentFilter: IntentFilter) => {
5555
const {action, category} = intentFilter;
5656

57+
if (!action || !category) {
58+
return false;
59+
}
60+
5761
let actions;
5862
let categories;
5963

0 commit comments

Comments
 (0)