mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-23 11:49:38 +00:00
Error while computing semantic tokens. Fixes #88366
This commit is contained in:
@@ -20,7 +20,7 @@ export function getSemanticTokens(jsLanguageService: ts.LanguageService, current
|
|||||||
if (node.kind === ts.SyntaxKind.Identifier) {
|
if (node.kind === ts.SyntaxKind.Identifier) {
|
||||||
const symbol = typeChecker.getSymbolAtLocation(node);
|
const symbol = typeChecker.getSymbolAtLocation(node);
|
||||||
if (symbol) {
|
if (symbol) {
|
||||||
const decl = symbol.valueDeclaration || symbol.declarations[0];
|
const decl = symbol.valueDeclaration || symbol.declarations && symbol.declarations[0];
|
||||||
if (decl) {
|
if (decl) {
|
||||||
let typeIdx = tokenFromDeclarationMapping[decl.kind];
|
let typeIdx = tokenFromDeclarationMapping[decl.kind];
|
||||||
let modifierSet = 0;
|
let modifierSet = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user