Skip to content

Commit

Permalink
fix(@angular/cli): fix empty space issue when setting `angular-cli.js…
Browse files Browse the repository at this point in the history
…on` values

Close angular#5716
  • Loading branch information
sumitarora authored and dond2clouds committed Apr 23, 2018
1 parent 44beafb commit d3c1b07
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/@ngtools/json-schema/src/serializers/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ export class JsonSerializer implements Serializer {

this._willOutputValue();

if (node.items.length === 0) {
this._writer('[]');
return;
}

this._writer('[');
this._state.push({ empty: true, type: 'array' });
for (let i = 0; i < node.items.length; i++) {
Expand Down

0 comments on commit d3c1b07

Please sign in to comment.