Skip to content

Commit 7db434b

Browse files
GiteaBotsilverwindwxiaoguang
authored
Fix JS error on pull request page (go-gitea#30838) (go-gitea#30841)
Backport go-gitea#30838 by silverwind Fix this error seen on PR page, regression from go-gitea#30803: Co-authored-by: silverwind <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
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

Lines changed: 1 addition & 0 deletions
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)