Skip to content

Commit 1f501da

Browse files
authored
Fix JS NPE when viewing specific range of PR commits (#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 1ccdb54 commit 1f501da

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)