Skip to content

Commit df4ee8c

Browse files
authored
fix(@angular-devkit/core): fix 'this' check (#12873)
1 parent d3e1149 commit df4ee8c

File tree

1 file changed

+3
-1
lines changed
  • packages/angular_devkit/core/src/json/schema

1 file changed

+3
-1
lines changed

packages/angular_devkit/core/src/json/schema/registry.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,9 @@ export class CoreSchemaRegistry implements SchemaRegistry {
588588
compilationSchemInfo.promptDefinitions.push(definition);
589589

590590
return function(this: { promptFieldsWithValue: Set<string> }) {
591-
if (this) {
591+
// If 'this' is undefined in the call, then it defaults to the global
592+
// 'this'.
593+
if (this && this.promptFieldsWithValue) {
592594
this.promptFieldsWithValue.add(path);
593595
}
594596

0 commit comments

Comments
 (0)