test update, unsafe access fix

This commit is contained in:
Michael Kret 2024-09-19 09:09:40 +03:00
parent 57231cb157
commit 9a2f9cee62
2 changed files with 2 additions and 2 deletions

View file

@ -63,7 +63,7 @@ describe('WaitingWebhooks', () => {
* Arrange
*/
executionRepository.findSingleExecution.mockResolvedValue(
mock<IExecutionResponse>({ finished: true }),
mock<IExecutionResponse>({ finished: true, workflowData: { nodes: [] } }),
);
/**

View file

@ -88,7 +88,7 @@ export class WaitingWebhooks implements IWebhookManager {
throw new ConflictError(`The execution "${executionId} is running already.`);
}
if (execution.data.resultData.error) {
if (execution.data?.resultData?.error) {
throw new ConflictError(`The execution "${executionId} has finished already.`);
}