Skip to content

Commit

Permalink
fix(semanticTokens): check delta.data (#3853)
Browse files Browse the repository at this point in the history
have no idea why delta.data is undefined
  • Loading branch information
fannheyward authored May 28, 2022
1 parent 250e81f commit 49238dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/handler/semanticTokens/buffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ export default class SemanticTokensBuffer implements SyncItem {
} else if (previousResult && Array.isArray(result.edits)) {
tokens = previousResult.tokens
result.edits.forEach(e => {
tokens.splice(e.start, e.deleteCount ? e.deleteCount : 0, ...e.data)
tokens.splice(e.start, e.deleteCount ? e.deleteCount : 0, ...e.data ?? [])
})
}
this.previousResults = { resultId: result.resultId, tokens, version }
Expand Down

0 comments on commit 49238dd

Please sign in to comment.