Skip to content

Commit

Permalink
Merge branch 'fix/cannot-create-mock-for-undefined-input' into releas…
Browse files Browse the repository at this point in the history
…e/1.23.1
  • Loading branch information
milosdanilov committed Nov 10, 2021
2 parents 7316afb + 798500a commit 08d3f84
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/models/generic/WorkflowModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,12 @@ export abstract class WorkflowModel extends ValidationBase implements Serializab
.replace("document", ""); // so loc is relative to root

const input = fetchByLoc(this, loc);
context = { self: JobHelper.generateMockJobData(input) };

if (!input) {
return expression.validate();
}

context = { self: JobHelper.generateMockJobData(input) };
return expression.validate(context);
}

Expand Down

0 comments on commit 08d3f84

Please sign in to comment.