     if @visible then @hide 0 else @show 0, disableHoverEvents
 
   resize: ->
-    promiseNextTick =>
+    promiseNextTick.then() =>
       if @visible then @show(0) else @hide(0)
     .catch error
 

        "tree-view:#{command}", => @clearFocusedElement()

  update: ->
    promiseNextTick =>
      if @conf.pushEditor
        @treeViewEl.style.position = 'relative'
        atom.views.getView(@treeView.panel)?.style.width = ''

  res[key] = obj[key] for own key of obj
  res

promiseNextTick = ->
  new Promise (resolve) ->
    process.nextTick ->
      resolve()

class AutohideTreeView
  config:
