Skip to content

Commit b489d66

Browse files
authored
lib: compensate for duplicate nodes in path (#288)
1 parent c4441f6 commit b489d66

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/ui/panel.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ export const Panel = {
1212
workbench.executeCommand("close-panel", {}, path);
1313
}
1414
const goBack = (e) => {
15-
path.pop();
15+
let node = path.pop();
16+
// if there was a duplicate id in the path,
17+
// pop again
18+
if (node === path.node) {
19+
path.pop();
20+
}
1621
}
1722
const maximize = (e) => {
1823
// todo: should be a command

0 commit comments

Comments
 (0)