mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-09 19:58:15 +00:00
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user