It looks like cell.toggleExpanded() calls _treeView.setNodeExpanded() without animated:true, but that's not clear from the code here (which looks like !animated does more work that animated).  Maybe comment that cell.toggleExpanded will loop back to other code path?