summaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
authorGiteabot <teabot@gitea.io>2023-11-06 17:22:44 +0800
committerGitHub <noreply@github.com>2023-11-06 09:22:44 +0000
commit49f82ac4e37e34f1544138a523ce25125ae56453 (patch)
tree12ca03fa4e16745a12fb166ed4e866d0d7444118 /web_src
parent81d233d98791991fda1651fbbfce888de6cbf033 (diff)
downloadgitea-49f82ac4e37e34f1544138a523ce25125ae56453.tar.gz
gitea-49f82ac4e37e34f1544138a523ce25125ae56453.zip
Fix JS NPE when viewing specific range of PR commits (#27912) (#27923)
Backport #27912 by @delvh This should be the easiest fix. While other solutions might be possible that exterminate the root cause, they will not be as trivial. Co-authored-by: delvh <dev.lh@web.de>
Diffstat (limited to 'web_src')
-rw-r--r--web_src/js/components/DiffCommitSelector.vue2
1 files changed, 1 insertions, 1 deletions
diff --git a/web_src/js/components/DiffCommitSelector.vue b/web_src/js/components/DiffCommitSelector.vue
index 3f7100d201..439840c306 100644
--- a/web_src/js/components/DiffCommitSelector.vue
+++ b/web_src/js/components/DiffCommitSelector.vue
@@ -94,7 +94,7 @@ export default {
focusElem(elem, prevElem) {
if (elem) {
elem.tabIndex = 0;
- prevElem.tabIndex = -1;
+ if (prevElem) prevElem.tabIndex = -1;
elem.focus();
}
},