Skip to content

Commit

Permalink
Fix reverse manipulation (SAP#2386)
Browse files Browse the repository at this point in the history
* fixed in-place reverse causing side-effects
  • Loading branch information
hardl authored Nov 18, 2021
1 parent e61b74a commit e976a37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/App.html
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@
localNavPath.push(parent);
parent = parent.parent;
}
localNavPath = localNavPath.reverse();
localNavPath = [...localNavPath].reverse();
}

let path = params.link;
Expand Down Expand Up @@ -564,7 +564,7 @@
} else if (params.fromContext) {
// from a given navigation context
const navigationContext = params.fromContext;
const node = localNavPath
const node = [...localNavPath]
.reverse()
.find(n => navigationContext === n.navigationContext);
path = Routing.concatenatePath(getSubPath(node, localPathParams), params.link);
Expand Down

0 comments on commit e976a37

Please sign in to comment.