fix error when a symbol provider doesn't return a result

This commit is contained in:
Johannes Rieken
2017-11-16 15:03:26 +01:00
parent fdcecb53e6
commit e5c5a35e3a

View File

@@ -422,7 +422,9 @@ class NavigateTypeAdapter {
}
}
}).then(() => {
this._resultCache[result._id] = [result.symbols[0]._id, result.symbols[result.symbols.length - 1]._id];
if (result.symbols.length > 0) {
this._resultCache[result._id] = [result.symbols[0]._id, result.symbols[result.symbols.length - 1]._id];
}
return result;
});
}