Skip to content

Commit 6ac1452

Browse files
authored
Return empty list when executions is null (#449)
1 parent 4537ccf commit 6ac1452

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

server/router/helpers/inject-domain-into-workflow-list.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@
2020
// THE SOFTWARE.
2121

2222
const injectDomainIntoWorkflowList = (domainName, { executions = [] } = {}) =>
23-
executions.map(execution => ({
24-
...execution,
25-
domainName,
26-
}));
23+
!executions
24+
? []
25+
: executions.map(execution => ({
26+
...execution,
27+
domainName,
28+
}));
2729

2830
module.exports = injectDomainIntoWorkflowList;

0 commit comments

Comments
 (0)