Simplify TeacherProjectService.getNodesByToNodeId() using concat and filter()
Remove unnecessary null check in RemoveNodeIdFromTransitionsService.remove(). The call to TeacherProjectService.getNodesByToNodeId() should never return an array with null element(s).
Remove line that was never used in RemoveNodeIdFromTransitionsService:
// get all the nodes that have a transition to the node we are removing
const nodesByToNodeId = this.projectService.getNodesByToNodeId(groupIdWeAreMoving);
Clean up other related code
Test
Verify that the null check in RemoveNodeIdFromTransitionsService.remove() was really not necessary.
These actions work as before in the AT > unit view:
Moving step(s)/group(s) in/between active and inactive sections
Deleting step(s)/group(s) in/between active and inactive sections
Changes
TeacherProjectService.getNodesByToNodeId()
usingconcat
andfilter()
RemoveNodeIdFromTransitionsService.remove()
. The call toTeacherProjectService.getNodesByToNodeId()
should never return an array with null element(s).RemoveNodeIdFromTransitionsService
:Test
RemoveNodeIdFromTransitionsService.remove()
was really not necessary.