Skip to content

Commit

Permalink
fix(Authoring): Delete first step in branch path loses criteria (#1797)
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffreykwan authored May 14, 2024
1 parent 527e23c commit 9738dfd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/assets/wise5/services/teacherProjectService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1644,7 +1644,7 @@ export class TeacherProjectService extends ProjectService {
}

// remove the transition to the node we are removing
transitions.splice(t, 1);
const transitionRemoved = transitions.splice(t, 1)[0];

if (transitionsCopy != null) {
let insertIndex = t;
Expand Down Expand Up @@ -1685,6 +1685,9 @@ export class TeacherProjectService extends ProjectService {
) {
this.addToTransition(node, this.getGroupStartId(toNodeId));
} else {
if (transitionRemoved.criteria != null) {
transitionCopy.criteria = transitionRemoved.criteria;
}
transitions.splice(insertIndex, 0, transitionCopy);
insertIndex++;
}
Expand Down

0 comments on commit 9738dfd

Please sign in to comment.