Skip to content

Commit

Permalink
fix: skip if there's no action or category (#2432)
Browse files Browse the repository at this point in the history
* fix: skip if there's no `action` or `category`

* fix: indentation
  • Loading branch information
szymonrybczak authored Jun 26, 2024
1 parent 7806690 commit 988e149
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

<application android:name=".MainApplication">
<activity android:name="com.example.ExampleAppActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand Down
4 changes: 4 additions & 0 deletions packages/cli-platform-android/src/config/getMainActivity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ export default function getMainActivity(manifestPath: string): string | null {
return intentFilters.find((intentFilter: IntentFilter) => {
const {action, category} = intentFilter;

if (!action || !category) {
return false;
}

let actions;
let categories;

Expand Down

0 comments on commit 988e149

Please sign in to comment.