mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-11 11:15:24 +03:00
fix reading error of length property on null
This commit is contained in:
parent
e2cf6adde5
commit
dad98e2b51
@ -102,8 +102,13 @@ class SubsequenceProvider {
|
||||
'(){}[] :;,$@%',
|
||||
this.maxResultsPerBuffer
|
||||
).then(matches => {
|
||||
for (let k = 0; k < matches.length; k++) {
|
||||
matches[k].configSuggestion = suggestions[matches[k].positions[0].row]
|
||||
// The findWordsWithSubsequence method will return `null`
|
||||
// if the async work was cancelled due to the buffer being
|
||||
// mutated since it was enqueued.
|
||||
if (matches) {
|
||||
for (let k = 0; k < matches.length; k++) {
|
||||
matches[k].configSuggestion = suggestions[matches[k].positions[0].row]
|
||||
}
|
||||
}
|
||||
return matches
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user