Fix invalid line number computation when clicking on something else than a line number

This commit is contained in:
Guillaume Gomez 2022-05-30 16:53:24 +02:00
parent 5c780b98d1
commit f3eae89b33

View File

@ -205,6 +205,10 @@ const handleSourceHighlight = (function() {
return ev => {
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();
if (ev.shiftKey && prev_line_id) {