   res[key] = obj[key] for own key of obj
   res
 
-promiseNextTick = (cb) ->
+promiseNextTick = ->
   new Promise (resolve) ->
     process.nextTick ->
       resolve()
-  .then cb
 
 class AutohideTreeView
   config:

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

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

    if @visible then @hide 0 else @show 0, disableHoverEvents

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

