Skip to content

Commit 5fda70c

Browse files
committed
Don't throw exceptions if Kite provider wasn't activated properly
Fixes autocomplete-python#280 cc @abe33 I have to fix it this way since I cannot fix original problem from within this package. Please keep this in mind and maybe remove this changes after original problem is fixed.
1 parent 961b287 commit 5fda70c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎lib/main.coffee‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,12 @@ module.exports =
262262
@kiteProvider = @kitePackage.completions()
263263
getSuggestions = @kiteProvider.getSuggestions
264264
@kiteProvider.getSuggestions = (args...) =>
265-
getSuggestions.apply(@kiteProvider, args)
266-
.then (suggestions) =>
265+
getSuggestions?.apply(@kiteProvider, args)
266+
?.then (suggestions) =>
267267
@lastKiteSuggestions = suggestions
268268
@kiteSuggested = suggestions?
269269
suggestions
270-
.catch (err) =>
270+
?.catch (err) =>
271271
@lastKiteSuggestions = []
272272
@kiteSuggested = false
273273
throw err

0 commit comments

Comments
 (0)