Skip to content

Commit

Permalink
cleanupTasksAndSteps: remove steps without tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunanoordin committed Apr 25, 2024
1 parent 71fa91f commit cfed5c4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/pages/lab-pages-editor/helpers/cleanupTasksAndSteps.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default function cleanupTasksAndSteps(tasks = {}, steps = []) {
const stepKeys = newSteps.map(step => step[0]);

// Remove steps without tasks
newSteps = newSteps.filter(step => step?.[1]?.taskKeys?.length > 0);

// Remove orphaned references in branching tasks.
Object.values(newTasks).forEach(task => {
Expand Down

0 comments on commit cfed5c4

Please sign in to comment.