New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle findWordsWithSubsequence cancellations #921

Merged
merged 2 commits into from Nov 14, 2017

Conversation

Projects
None yet
4 participants
@maxbrunsfeld
Contributor

maxbrunsfeld commented Nov 14, 2017

maxbrunsfeld added some commits Nov 14, 2017

Handle findWordsWithSubsequence cancellations
Signed-off-by: Justin Ratner <leroix08@gmail.com>

@maxbrunsfeld maxbrunsfeld merged commit 67460bb into master Nov 14, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@maxbrunsfeld maxbrunsfeld deleted the mb-jr-handle-subsequence-cancellations branch Nov 14, 2017

maxbrunsfeld added a commit that referenced this pull request Nov 14, 2017

Merge pull request #921 from atom/mb-jr-handle-subsequence-cancellations
Handle findWordsWithSubsequence cancellations
@wanderley

This comment has been minimized.

Show comment
Hide comment
@wanderley

wanderley Apr 11, 2018

Hi @maxbrunsfeld, I found that this error

Cannot read property 'length' of null; stack: TypeError: Cannot read property 'length' of null
    at configSuggestionsBuffer.findWordsWithSubsequence.then.matches (/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete-plus/lib/subsequence-provider.js:123:40)

happens because findWordsWithSubsequence returns null when the async call is cancelled. So, I think that it is a good idea check for null in configSuggestionsToSubsequenceMatches

wanderley commented Apr 11, 2018

Hi @maxbrunsfeld, I found that this error

Cannot read property 'length' of null; stack: TypeError: Cannot read property 'length' of null
    at configSuggestionsBuffer.findWordsWithSubsequence.then.matches (/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete-plus/lib/subsequence-provider.js:123:40)

happens because findWordsWithSubsequence returns null when the async call is cancelled. So, I think that it is a good idea check for null in configSuggestionsToSubsequenceMatches

@Arcanemagus

This comment has been minimized.

Show comment
Hide comment
@Arcanemagus

Arcanemagus Apr 11, 2018

@wanderley Could you file an issue (or a PR!) about that? Thanks!

Arcanemagus commented Apr 11, 2018

@wanderley Could you file an issue (or a PR!) about that? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment