Skip to content

Commit 204d312

Browse files
sumitarorafilipesilva
authored andcommitted
fix(@angular/cli): fix empty space issue when setting angular-cli.json values
Close angular#5716
1 parent a8f498b commit 204d312

File tree

1 file changed

+5
-0
lines changed
  • packages/@ngtools/json-schema/src/serializers

1 file changed

+5
-0
lines changed

packages/@ngtools/json-schema/src/serializers/json.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ export class JsonSerializer implements Serializer {
110110

111111
this._willOutputValue();
112112

113+
if (node.items.length === 0) {
114+
this._writer('[]');
115+
return;
116+
}
117+
113118
this._writer('[');
114119
this._state.push({ empty: true, type: 'array' });
115120
for (let i = 0; i < node.items.length; i++) {

0 commit comments

Comments
 (0)