Skip to content

Commit 49f82ac

Browse files
GiteaBotdelvh
andauthored
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 <[email protected]>
1 parent 81d233d commit 49f82ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web_src/js/components/DiffCommitSelector.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export default {
9494
focusElem(elem, prevElem) {
9595
if (elem) {
9696
elem.tabIndex = 0;
97-
prevElem.tabIndex = -1;
97+
if (prevElem) prevElem.tabIndex = -1;
9898
elem.focus();
9999
}
100100
},

0 commit comments

Comments
 (0)