lib/js/SidebarView.js
function(tree) {
        var branches = tree.branches;
        for (var i in branches) {
          var subTree = branches[i];
          if (subTree.isOpen && !subTree.isLoading) {
            branches[i] = trimSubBranch(subTree);
          } else {
            branches[i] = {
              id: subTree.id,
            };
            if (subTree.label) {
              branches[i].label = subTree.label;
            }
          }
        }
        return tree;
      }
function(tree) {
        var branches = tree.branches;
        for (var i in branches) {
          var subTree = branches[i];
          if (subTree.isOpen && !subTree.isLoading) {
            branches[i] = trimSubBranch(subTree);
          } else {
            branches[i] = {
              id: subTree.id,
            };
            if (subTree.label) {
              branches[i].label = subTree.label;
            }
          }
        }
        return tree;
      }
function ( tree ) { var branches = tree . branches ; for ( var i in branches ) { var subTree = branches [ i ] ; if ( subTree . isOpen && ! subTree . isLoading ) { branches [ i ] = trimSubBranch ( subTree ) ; } else { branches [ i ] = { id : subTree . id , } ; if ( subTree . label ) { branches [ i ] . label = subTree . label ; } } } return tree ; }
Function to trim closed sub-branches from a tree
Function to trim closed sub - branches from a tree