Skip to content

Commit 7db434b

Browse files
GiteaBotsilverwindwxiaoguang
authored
Fix JS error on pull request page (#30838) (#30841)
Backport #30838 by silverwind Fix this error seen on PR page, regression from #30803: Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
1 parent 41f8ef8 commit 7db434b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

web_src/js/features/repo-legacy.js

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export function initRepoCommentForm() {
5757

5858
function initBranchSelector() {
5959
const elSelectBranch = document.querySelector('.ui.dropdown.select-branch');
60+
if (!elSelectBranch) return;
6061
const isForNewIssue = elSelectBranch.getAttribute('data-for-new-issue') === 'true';
6162

6263
const $selectBranch = $(elSelectBranch);

0 commit comments

Comments
 (0)