avoid accessing property of undefined
MODIFY
lib/project/results-view.js
lib/project/results-view.js
@@ -261,9 +261,11 @@ class ResultsView {
if (match.trailingContextLines) result += this.contextLineHeight * match.trailingContextLines.length;
}
+ if (selectedResult) {
const selectedMatch = selectedResult.matches[this.selectedMatchIndex];
if (selectedMatch.leadingContextLines) result += this.contextLineHeight * selectedMatch.leadingContextLines.length;
}
+ }
return result;
}

avoid accessing property of undefined