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:
Victor Noel 2017-11-21 11:39:09 +01:00 committed by Miško Hevery
parent d365077dfa
commit 3e47ea27f5
1 changed files with 1 additions and 1 deletions

View File

@ -481,7 +481,7 @@ export class StaticSymbolResolver {
if (moduleMetadatas) {
let maxVersion = -1;
moduleMetadatas.forEach((md) => {
if (md['version'] > maxVersion) {
if (md && md['version'] > maxVersion) {
maxVersion = md['version'];
moduleMetadata = md;
}