Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): compile schema in synchronously
Browse files Browse the repository at this point in the history
AJV only support a single schema with the same ID, compiling schemas async can cause a race condition were multiple schemas with the same name as compiled at the same time.

Closes #20847
  • Loading branch information
alan-agius4 committed May 19, 2021
1 parent d66fe41 commit 43926a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/angular_devkit/core/src/json/schema/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export class CoreSchemaRegistry implements SchemaRegistry {
let validator: ValidateFunction;
try {
this._currentCompilationSchemaInfo = schemaInfo;
validator = await this._ajv.compileAsync(schema);
validator = this._ajv.compile(schema);
} finally {
this._currentCompilationSchemaInfo = undefined;
}
Expand Down

0 comments on commit 43926a2

Please sign in to comment.