Skip to content

Commit

Permalink
🐛 Fix broken access to minimap for editor when editor is undefined
Browse files Browse the repository at this point in the history
Fixes #200
  • Loading branch information
abe33 committed Jan 7, 2015
1 parent 3af01e2 commit 01b2bc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/main-v4.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class V4Main
@toggled = true
@initSubscriptions()

minimapForEditor: (editor) -> @editorsMinimaps[editor.id]
minimapForEditor: (editor) -> @editorsMinimaps[editor.id] if editor?

observeMinimaps: (iterator) ->
return unless iterator?
Expand All @@ -46,7 +46,7 @@ class V4Main

@subscriptions.add atom.workspace.observeTextEditors (textEditor) =>
return if @editorsMinimaps[textEditor.id]?

minimap = new Minimap({textEditor})
@editorsMinimaps[textEditor.id] = minimap

Expand Down

0 comments on commit 01b2bc8

Please sign in to comment.