Skip to content

Commit

Permalink
temporary fix "Cannot read property symbol of undefined"
Browse files Browse the repository at this point in the history
  • Loading branch information
Tam Nguyen committed Nov 7, 2019
1 parent 7cf6c70 commit 43d1d74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tsserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -106106,7 +106106,7 @@ var ts;
// If the symbol/moduleSymbol was a merged symbol, it will have a new identity
// in the checker, even though the symbols to merge are the same (guaranteed by
// cache invalidation in synchronizeHostData).
if (suggestion.symbol.declarations) {
if (suggestion.symbol.declarations && suggestion.symbol.declarations[0]) {
suggestion.symbol = checker.getMergedSymbol(suggestion.origin.isDefaultExport
? suggestion.symbol.declarations[0].localSymbol || suggestion.symbol.declarations[0].symbol
: suggestion.symbol.declarations[0].symbol);
Expand Down

0 comments on commit 43d1d74

Please sign in to comment.