aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/features
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2024-05-03 04:12:10 +0200
committerGitHub <noreply@github.com>2024-05-03 10:12:10 +0800
commitc4e875402bd8e787c21bbd4ea07cbb69a8ceef27 (patch)
tree329315dfea8b0d391b85698330489a82658617cc /web_src/js/features
parentb30b7df9f4b4e1ae7ec55750bca7577bf88abd0b (diff)
downloadgitea-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.js1
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);