Skip to content

Commit

Permalink
Fix firefox-devtools#5918 - Prevent index weirdness
Browse files Browse the repository at this point in the history
  • Loading branch information
darkwing committed Jun 8, 2018
1 parent ad39ea0 commit afb72d5
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/components/shared/ManagedTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,6 @@ class ManagedTree extends Component<Props, State> {
// This file is visible, so we highlight it.
if (expanded.has(this.props.getPath(highlightItems[0]))) {
this.focusItem(highlightItems[0]);
} else {
// Look at folders starting from the top-level until finds a
// closed folder and highlights this folder
const index = highlightItems
.reverse()
.findIndex(item => !expanded.has(this.props.getPath(item)));
this.focusItem(highlightItems[index]);
}
}

Expand Down

0 comments on commit afb72d5

Please sign in to comment.