     @statusBarTile = statusBar.addRightTile item: div, priority: 0
 
   setupBranchesMenuToggle: (statusBar) ->
-    statusBar.getRightTiles().some ({item}) =>
+    statusBar.getRightTiles().some ({item}) ->
       if item?.classList?.contains? 'git-view'
-        $(item).find('.git-branch').on 'click', (e) =>
+        $(item).find('.git-branch').on 'click', (e) ->
           {newBranchKey} = atom.config.get('git-plus.general')
           pressed = (key) -> e["#{key}Key"]
           if pressed newBranchKey
-            atom.commands.dispatch(@workspace, 'git-plus:new-branch')
+            atom.commands.dispatch(getWorkspaceNode(), 'git-plus:new-branch')
           else
-            atom.commands.dispatch(@workspace, 'git-plus:checkout')
+            atom.commands.dispatch(getWorkspaceNode(), 'git-plus:checkout')
         return true

  autoFetch: (interval) ->
    clearInterval @autoFetchInterval
    if fetchIntervalMs = (interval * 60) * 1000
      fetch = => atom.commands.dispatch(@workspace, 'git-plus:fetch-all')
      @autoFetchInterval = setInterval(fetch, fetchIntervalMs)

  consumeAutosave: ({dontSaveIf}) ->

  gp.activate?()
  gp.consumeStatusBar?(gp.statusBar) if gp.statusBar

getWorkspaceNode = -> document.querySelector('atom-workspace')

module.exports =
  config: configurations

  subscriptions: null

  provideService: -> require './service'

