Skip to content

Commit

Permalink
🐛 Fix minimap instanciated before having required Minimap
Browse files Browse the repository at this point in the history
Closes #212
  • Loading branch information
abe33 committed Feb 3, 2015
1 parent 35c27e6 commit ca01a30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/main.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ class Main
# Returns a {Minimap}.
minimapForEditor: (textEditor) ->
return unless textEditor?

Minimap ?= require './minimap'
@editorsMinimaps ?= new Map

minimap = @editorsMinimaps.get(textEditor)
Expand Down Expand Up @@ -260,8 +262,6 @@ class Main

# Internal: Registers
initSubscriptions: ->
Minimap ?= require './minimap'

@subscriptions.add atom.workspace.observeTextEditors (textEditor) =>
minimap = @minimapForEditor(textEditor)

Expand Down

0 comments on commit ca01a30

Please sign in to comment.