Skip to content

Commit

Permalink
fix(@angular-devkit/core): allow multiselect list defaults
Browse files Browse the repository at this point in the history
Fixes #16104
  • Loading branch information
clydin authored and mgechev committed Nov 12, 2019
1 parent 2a5d051 commit a2f58a1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/angular_devkit/core/src/json/schema/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,12 @@ export class CoreSchemaRegistry implements SchemaRegistry {
raw: schema,
items,
multiselect,
default: typeof parentSchema.default == 'object' ? undefined : parentSchema.default,
default:
typeof parentSchema.default == 'object' &&
parentSchema.default !== null &&
!Array.isArray(parentSchema.default)
? undefined
: parentSchema.default as string[],
async validator(data: JsonValue) {
try {
return await it.self.validate(parentSchema, data);
Expand Down

0 comments on commit a2f58a1

Please sign in to comment.