aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/features
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2024-03-17 13:50:32 +0100
committerGitHub <noreply@github.com>2024-03-17 12:50:32 +0000
commit33973ac567d6681bda26d82f26b7294a297c693f (patch)
treeca7d3ad0e8811af6ce94941cfc9b3fbd124b6604 /web_src/js/features
parent673286d8c8a00bf7240a93187d767fb5a5e32a31 (diff)
downloadgitea-33973ac567d6681bda26d82f26b7294a297c693f.tar.gz
gitea-33973ac567d6681bda26d82f26b7294a297c693f.zip
Avoid JS error on issue/pr list when logged out (#29854)
When logged out, the checkboxes are not there on the issue/pr lists, which would cause an error here. Fixes: https://github.com/go-gitea/gitea/issues/29862 --------- Co-authored-by: delvh <dev.lh@web.de>
Diffstat (limited to 'web_src/js/features')
-rw-r--r--web_src/js/features/repo-issue-list.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/web_src/js/features/repo-issue-list.js b/web_src/js/features/repo-issue-list.js
index 48b1555c89..880ecf9489 100644
--- a/web_src/js/features/repo-issue-list.js
+++ b/web_src/js/features/repo-issue-list.js
@@ -9,6 +9,7 @@ import {DELETE, POST} from '../modules/fetch.js';
function initRepoIssueListCheckboxes() {
const issueSelectAll = document.querySelector('.issue-checkbox-all');
+ if (!issueSelectAll) return; // logged out state
const issueCheckboxes = document.querySelectorAll('.issue-checkbox');
const syncIssueSelectionState = () => {