Skip to content

Commit

Permalink
fix searching for a suitable task when there is only one
Browse files Browse the repository at this point in the history
  • Loading branch information
ElenaDiachenko committed Dec 17, 2024
1 parent b476dc0 commit 165ee32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/tasks/taskFinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ export const extractSingleExecutableTask = async (
suitableTasks: RnvTask[],
taskName: string
): Promise<RnvTask | undefined> => {
if (suitableTasks.length === 1) {
const { platform } = getContext();
if (suitableTasks.length === 1 && platform) {
return suitableTasks[0];
} else if (suitableTasks.length === 0) {
return undefined;
Expand Down

0 comments on commit 165ee32

Please sign in to comment.