Skip to content

Commit

Permalink
feat(AT): Go back to project view after adding new node #1406 (#1407)
Browse files Browse the repository at this point in the history
  • Loading branch information
hirokiterashima authored Sep 11, 2023
1 parent 21d0fc6 commit 36787d2
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ export class ChooseNewNodeLocation {
}

private addInitialComponents(nodeId: string, components: any[]): void {
for (const component of components.reverse()) {
this.projectService.createComponent(nodeId, component.type);
}
components
.reverse()
.forEach((component) => this.projectService.createComponent(nodeId, component.type));
}

private save(): any {
Expand All @@ -47,9 +47,9 @@ export class ChooseNewNodeLocation {
}

private goToNode(node: any): void {
this.router.navigate(['../../node', node.id], {
this.router.navigate(['../..'], {
relativeTo: this.route,
state: { newComponents: node.components }
state: { newNodes: [node] }
});
}

Expand Down

0 comments on commit 36787d2

Please sign in to comment.