Skip to content

Commit baa676a

Browse files
authored
fix(get-flow): consider when there are not children (#683)
1 parent 7b5922b commit baa676a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/server/views/helpers/flowHelpers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
const Helpers = {
22
processFlow: function (flow) {
33
if (!flow) return {};
4-
const {job, children} = flow;
4+
const {job, children = []} = flow;
55
const filteredChildren = children.filter((child) => child);
66
const queueName = job.queueName;
77

8-
if (filteredChildren && filteredChildren.length > 0) {
8+
if (filteredChildren.length > 0) {
99
return {
1010
job: {...job, queueName},
1111
children: filteredChildren.map((child) => this.processFlow(child)),

0 commit comments

Comments
 (0)