     for pathComponent in activePathComponents
       currentPath += path.sep + pathComponent
       entry = @entryForPath(currentPath)
-      if entry.hasClass('directory')
+      if entry instanceof DirectoryView
         entry.expand()
       else
         centeringOffset = (@scrollBottom() - @scrollTop()) / 2

    @[0].offsetWidth
    @[0].style.display = 'block'

  onSideToggled: (newValue) ->
    @detach()
    @attach()

    @on 'dblclick', '.tree-view-resize-handle', => @resizeToFitContent()
    @on 'click', '.entry', (e) =>
      @entryClicked(e) unless e.shiftKey or e.metaKey or e.ctrlKey
    @on 'mousedown', '.entry', (e) => @onMouseDown(e)

    # turn off default scrolling behavior from ScrollView
    @off 'core:move-up'
