fix(language-service): ignore null metadatas (#20557)
There can be null metadatas in certain cases, for example with locales. Fixes #20260 PR Close #20557
This commit is contained in:
parent
d365077dfa
commit
3e47ea27f5
|
@ -481,7 +481,7 @@ export class StaticSymbolResolver {
|
||||||
if (moduleMetadatas) {
|
if (moduleMetadatas) {
|
||||||
let maxVersion = -1;
|
let maxVersion = -1;
|
||||||
moduleMetadatas.forEach((md) => {
|
moduleMetadatas.forEach((md) => {
|
||||||
if (md['version'] > maxVersion) {
|
if (md && md['version'] > maxVersion) {
|
||||||
maxVersion = md['version'];
|
maxVersion = md['version'];
|
||||||
moduleMetadata = md;
|
moduleMetadata = md;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue