diff --git a/packages/language-server/src/util/toLS.ts b/packages/language-server/src/util/toLS.ts index 7531adb20..d2902e697 100644 --- a/packages/language-server/src/util/toLS.ts +++ b/packages/language-server/src/util/toLS.ts @@ -132,7 +132,7 @@ export function documentSymbols( ...(s.typeDefinition ?? []), ].find((l) => l.uri === doc.uri), ] as const - ).filter(([_s, l]) => !!l).map(([s, l]) => + ).filter(([s, l]) => !!l && s.identifier).map(([s, l]) => documentSymbol(s, l!, doc, hierarchicalSupport, supportedKinds) ) }