diff options
author | silverwind <me@silverwind.io> | 2024-05-03 04:12:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-03 10:12:10 +0800 |
commit | c4e875402bd8e787c21bbd4ea07cbb69a8ceef27 (patch) | |
tree | 329315dfea8b0d391b85698330489a82658617cc /web_src/js/features | |
parent | b30b7df9f4b4e1ae7ec55750bca7577bf88abd0b (diff) | |
download | gitea-c4e875402bd8e787c21bbd4ea07cbb69a8ceef27.tar.gz gitea-c4e875402bd8e787c21bbd4ea07cbb69a8ceef27.zip |
Fix JS error on pull request page (#30838)
Fix this error seen on PR page, regression from
https://github.com/go-gitea/gitea/pull/30803:
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'web_src/js/features')
-rw-r--r-- | web_src/js/features/repo-legacy.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/web_src/js/features/repo-legacy.js b/web_src/js/features/repo-legacy.js index 670e60def0..b65938b045 100644 --- a/web_src/js/features/repo-legacy.js +++ b/web_src/js/features/repo-legacy.js @@ -57,6 +57,7 @@ export function initRepoCommentForm() { function initBranchSelector() { const elSelectBranch = document.querySelector('.ui.dropdown.select-branch'); + if (!elSelectBranch) return; const isForNewIssue = elSelectBranch.getAttribute('data-for-new-issue') === 'true'; const $selectBranch = $(elSelectBranch); |