Skip to content

Commit

Permalink
Fixes microsoft#51661: Cannot convert undefined or null to object
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaeumer committed Jun 13, 2018
1 parent 7ba2769 commit 04e893c
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,11 @@ TaskDefinitionRegistry.onReady().then(() => {
if (taskType.required) {
schema.required = taskType.required.slice();
}
for (let key of Object.keys(taskType.properties)) {
let property = taskType.properties[key];
schema.properties[key] = Objects.deepClone(property);
if (taskType.properties) {
for (let key of Object.keys(taskType.properties)) {
let property = taskType.properties[key];
schema.properties[key] = Objects.deepClone(property);
}
}
fixReferences(schema);
taskDefinitions.push(schema);
Expand Down

0 comments on commit 04e893c

Please sign in to comment.