Skip to content

Commit

Permalink
remove useless assignment to variable isThereChildItemsToExpand
Browse files Browse the repository at this point in the history
  • Loading branch information
EnzoBatistaU committed Nov 26, 2024
1 parent aef01b9 commit f5c2514
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/LibraryItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,14 @@ export class LibraryItem extends React.Component<LibraryItemProps, LibraryItemSt
//other elements is little tricky. The idea here is, the element which has
//its child elements expanded to false is the actual element clicked from search. Scroll
//to that element.
let isThereChildItemsToExpand = this.props.data.childItems.filter((item: any) => {

// The commented code below affects tests. This needs to be address
this.props.data.childItems.filter((item: any) => {
return item.expanded == true;
});
// let isThereChildItemsToExpand = this.props.data.childItems.filter((item: any) => {
// return item.expanded == true;
// });
// if (isThereChildItemsToExpand.length == 0) {
// setTimeout(() => {
// let elem = ReactDOM.findDOMNode(this);
Expand Down

0 comments on commit f5c2514

Please sign in to comment.