Merge pull request #3531 from microsoft/hediet/bugfix

Fixes bug that entries would be marked as deprecated if kindModifiers is undefined.
This commit is contained in:
Henning Dieterichs 2023-02-07 16:50:19 +01:00 committed by GitHub
commit accd0df430
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -474,7 +474,7 @@ export class SuggestAdapter extends Adapter implements languages.CompletionItemP
}
const tags: languages.CompletionItemTag[] = [];
if (entry.kindModifiers?.indexOf('deprecated') !== -1) {
if (entry.kindModifiers !== undefined && entry.kindModifiers.indexOf('deprecated') !== -1) {
tags.push(languages.CompletionItemTag.Deprecated);
}