Skip to content

Commit d3aac29

Browse files
delvhGiteaBot
authored andcommitted
Fix JS NPE when viewing specific range of PR commits (go-gitea#27912)
This should be the easiest fix. While other solutions might be possible that exterminate the root cause, they will not be as trivial.
1 parent 2f56ab7 commit d3aac29

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)