From 17a0d2c085519892d3ee59e7ef88c49d036a67cf Mon Sep 17 00:00:00 2001 From: Jason Jean Date: Fri, 3 Mar 2023 15:35:44 -0500 Subject: [PATCH] fix(core): do not return a default project when nxJson is undefined (#15432) --- packages/nx/src/config/workspaces.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nx/src/config/workspaces.ts b/packages/nx/src/config/workspaces.ts index c9ab38b4d5075..61a4cb381b026 100644 --- a/packages/nx/src/config/workspaces.ts +++ b/packages/nx/src/config/workspaces.ts @@ -64,7 +64,7 @@ export class Workspaces { }); if (matchingProject) return matchingProject; } - return nxJson.defaultProject; + return nxJson?.defaultProject; } readProjectsConfigurations(opts?: {