Skip to content

Commit

Permalink
lib: compensate for duplicate nodes in path (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArcaTech committed Aug 4, 2023
1 parent c4441f6 commit b489d66
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/ui/panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ export const Panel = {
workbench.executeCommand("close-panel", {}, path);
}
const goBack = (e) => {
path.pop();
let node = path.pop();
// if there was a duplicate id in the path,
// pop again
if (node === path.node) {
path.pop();
}
}
const maximize = (e) => {
// todo: should be a command
Expand Down

0 comments on commit b489d66

Please sign in to comment.