Partially backport #33094 Fix the scroll bug in issue/pr view page. Fix a JS error when line number exceeds the max
This commit is contained in:
parent
e10d222434
commit
fd281518ae
3 changed files with 7 additions and 18 deletions
|
@ -59,7 +59,7 @@ function selectRange($linesEls, $selectionEndEl, $selectionStartEls?) {
|
|||
copyPermalink.setAttribute('data-url', link);
|
||||
};
|
||||
|
||||
if ($selectionStartEls) {
|
||||
if ($selectionStartEls && $selectionStartEls[0]) {
|
||||
let a = parseInt($selectionEndEl[0].getAttribute('rel').slice(1));
|
||||
let b = parseInt($selectionStartEls[0].getAttribute('rel').slice(1));
|
||||
let c;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue