@angular-devkit/core 8.2.0-next.1 → 8.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-devkit/core",
3
- "version": "8.2.0-next.1",
3
+ "version": "8.2.2",
4
4
  "description": "Angular DevKit - Core Utility Library",
5
5
  "main": "src/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -58,15 +58,12 @@ function addUndefinedDefaults(value, _pointer, schema) {
58
58
  if (!interface_1.isJsonObject(schema.properties)) {
59
59
  return newValue;
60
60
  }
61
- for (const propName of Object.getOwnPropertyNames(schema.properties)) {
62
- if (propName in newValue) {
63
- continue;
64
- }
65
- else if (propName == '$schema') {
61
+ for (const [propName, schemaObject] of Object.entries(schema.properties)) {
62
+ if (newValue[propName] !== undefined || propName === '$schema') {
66
63
  continue;
67
64
  }
68
65
  // TODO: Does not currently handle more complex schemas (oneOf/anyOf/etc.)
69
- const defaultValue = schema.properties[propName].default;
66
+ const defaultValue = schemaObject.default;
70
67
  newValue[propName] = defaultValue;
71
68
  }
72
69
  return newValue;