Fix invalid line number computation when clicking on something else than a line number
This commit is contained in:
parent
5c780b98d1
commit
f3eae89b33
1 changed files with 4 additions and 0 deletions
|
@ -205,6 +205,10 @@ const handleSourceHighlight = (function() {
|
||||||
|
|
||||||
return ev => {
|
return ev => {
|
||||||
let cur_line_id = parseInt(ev.target.id, 10);
|
let cur_line_id = parseInt(ev.target.id, 10);
|
||||||
|
// It can happen when clicking not on a line number span.
|
||||||
|
if (isNaN(cur_line_id)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
|
|
||||||
if (ev.shiftKey && prev_line_id) {
|
if (ev.shiftKey && prev_line_id) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue