Skip to content

Commit 1002950

Browse files
committed
Fixes stash parents
1 parent c33dd48 commit 1002950

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/plus/webviews/graph/graphWebview.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,10 @@ async function convertToRows(
555555

556556
parents = commit.parents;
557557
// Remove the second parent, if existing, from each stash commit as it affects column processing
558-
if (parents.length > 1 && stash) {
559-
parents = [...parents].splice(1, 1);
558+
if (stash && parents.length > 1) {
559+
// Copy the array to avoid mutating the original
560+
parents = [...parents];
561+
parents.splice(1, 1);
560562
}
561563

562564
rows.push({

0 commit comments

Comments
 (0)