summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2024-03-17 13:50:32 +0100
committerEarl Warren <contact@earl-warren.org>2024-03-26 19:04:24 +0100
commit003d860aac403e0e1d95ebaecadb751926bb7827 (patch)
tree0593d142a35d55c82bbfd79df716523f83c255c4
parentRefactor clone-panel styles (#29861) (diff)
downloadforgejo-003d860aac403e0e1d95ebaecadb751926bb7827.tar.xz
forgejo-003d860aac403e0e1d95ebaecadb751926bb7827.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> (cherry picked from commit 33973ac567d6681bda26d82f26b7294a297c693f)
-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 = () => {