Skip to content

Commit 1af3f71

Browse files
alan-agius4dgp1130
authored andcommitted
fix(@angular-devkit/core): workspace writer skip creating empty projects property
Before ```json { "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "projects": {}, "cli": { "analytics": false, "warnings": { "versionMismatch": false } } } ```` After ```json { "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "cli": { "analytics": false, "warnings": { "versionMismatch": false } } } ```
1 parent 3884b86 commit 1af3f71

File tree

1 file changed

+3
-1
lines changed
  • packages/angular_devkit/core/src/workspace/json

1 file changed

+3
-1
lines changed

packages/angular_devkit/core/src/workspace/json/writer.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ function convertJsonWorkspace(workspace: WorkspaceDefinition, schema?: string):
5353
$schema: schema || './node_modules/@angular/cli/lib/config/schema.json',
5454
version: 1,
5555
...workspace.extensions,
56-
projects: workspace.projects ? convertJsonProjectCollection(workspace.projects) : {},
56+
...(isEmpty(workspace.projects)
57+
? {}
58+
: { projects: convertJsonProjectCollection(workspace.projects) }),
5759
};
5860

5961
return obj;

0 commit comments

Comments
 (0)