diff --git a/src/packages/spell-check/lib/misspelling-view.coffee b/src/packages/spell-check/lib/misspelling-view.coffee index 0940ce0f7..b2afdf1ce 100644 --- a/src/packages/spell-check/lib/misspelling-view.coffee +++ b/src/packages/spell-check/lib/misspelling-view.coffee @@ -1,7 +1,6 @@ {View} = require 'space-pen' Range = require 'range' CorrectionsView = require './corrections-view' -SpellChecker = require 'spellchecker' module.exports = class MisspellingView extends View @@ -31,6 +30,7 @@ class MisspellingView extends View screenRange = @getScreenRange() misspelling = @editor.getTextInRange(@editor.bufferRangeForScreenRange(screenRange)) + SpellChecker = require 'spellchecker' corrections = SpellChecker.getCorrectionsForMisspelling(misspelling) @correctionsView?.remove() @correctionsView = new CorrectionsView(@editor, corrections, screenRange)