@@ -133,10 +133,8 @@ class SpellCheckerManager
133133
134134 # If we don't have any incorrect spellings, then there is nothing to worry
135135 # about, so just return and stop processing.
136- misspellings = []
137-
138136 if incorrects .length is 0
139- return {id : args .id , misspellings}
137+ return {id : args .id , misspellings : [] }
140138
141139 # Build up an intersection of all the incorrect ranges. We only treat a word
142140 # as being incorrect if *every* checker that provides negative values treats
@@ -156,7 +154,7 @@ class SpellCheckerManager
156154
157155 # If we have no intersection, then nothing to report as a problem.
158156 if intersection .length is 0
159- return {id : args .id , misspellings}
157+ return {id : args .id , misspellings : [] }
160158
161159 # Remove all of the confirmed correct words from the resulting incorrect
162160 # list. This allows us to have correct-only providers as opposed to only
@@ -169,6 +167,7 @@ class SpellCheckerManager
169167 row = 0
170168 rangeIndex = 0
171169 lineBeginIndex = 0
170+ misspellings = []
172171 while lineBeginIndex < text .length and rangeIndex < intersection .ranges .length
173172 # Figure out where the next line break is. If we hit -1, then we make sure
174173 # it is a higher number so our < comparisons work properly.
@@ -348,7 +347,7 @@ class SpellCheckerManager
348347 # See if we need to reload the known words.
349348 if @knownWordsChecker is null
350349 console .log " spell-check: loading known words" , @knownWords
351- KnownWordsChecker = require ' ./known-words-checker.coffee '
350+ KnownWordsChecker = require ' ./known-words-checker'
352351 @knownWordsChecker = new KnownWordsChecker @knownWords
353352 @knownWordsChecker .enableAdd = @addKnownWords
354353 @ addSpellChecker @knownWordsChecker
@@ -378,7 +377,3 @@ class SpellCheckerManager
378377
379378manager = new SpellCheckerManager
380379module .exports = manager
381-
382- # KnownWordsChecker = require './known-words-checker.coffee'
383- # knownWords = atom.config.get('spell-check.knownWords')
384- # addKnownWords = atom.config.get('spell-check.addKnownWords')
0 commit comments