aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/features/repo-code.ts
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js/features/repo-code.ts')
-rw-r--r--web_src/js/features/repo-code.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/web_src/js/features/repo-code.ts b/web_src/js/features/repo-code.ts
index a8d6e8f97d..7b5b348db5 100644
--- a/web_src/js/features/repo-code.ts
+++ b/web_src/js/features/repo-code.ts
@@ -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;