Skip to content

Commit

Permalink
Avoid JS error on issue/pr list when logged out (#29854)
Browse files Browse the repository at this point in the history
When logged out, the checkboxes are not there on the issue/pr lists,
which would cause an error here.

Fixes: #29862

---------

Co-authored-by: delvh <dev.lh@web.de>
  • Loading branch information
silverwind and delvh authored Mar 17, 2024
1 parent 673286d commit 33973ac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions web_src/js/features/repo-issue-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down

0 comments on commit 33973ac

Please sign in to comment.