Skip to content

Commit

Permalink
test: fix for activities in tick objects prune function
Browse files Browse the repository at this point in the history
  • Loading branch information
asattelmaier committed Feb 17, 2019
1 parent a00b0c7 commit e760bc7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/async-hooks/verify-graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ function pruneTickObjects(activities) {
data: null
};

if (!Array.isArray(activities))
return activities;

while (tickObject.found) {
for (let i = 0; i < activities.length; i++) {
if (activities[i].type === 'TickObject') {
tickObject.index = i;
break;
} else if (i + 1 === activities.length) {
} else if (i + 1 >= activities.length) {
tickObject.found = false;
}
}
Expand Down

0 comments on commit e760bc7

Please sign in to comment.