diff --git a/templates/repo/issue/sidebar/project_column.tmpl b/templates/repo/issue/sidebar/project_column.tmpl index 8b06c93f21..5dad4f9c68 100644 --- a/templates/repo/issue/sidebar/project_column.tmpl +++ b/templates/repo/issue/sidebar/project_column.tmpl @@ -15,9 +15,6 @@ {{end}} -
- No column -
{{else if $selectedColumn}}
diff --git a/web_src/js/features/repo-issue-sidebar-combolist.ts b/web_src/js/features/repo-issue-sidebar-combolist.ts index 7c9f4e951a..f7a6f42051 100644 --- a/web_src/js/features/repo-issue-sidebar-combolist.ts +++ b/web_src/js/features/repo-issue-sidebar-combolist.ts @@ -9,7 +9,7 @@ export class IssueSidebarComboList { updateAlgo: string; selectionMode: string; elDropdown: HTMLElement; - elList: HTMLElement; + elList: HTMLElement | null; elComboValue: HTMLInputElement; initialValues: string[]; container: HTMLElement; @@ -37,6 +37,7 @@ export class IssueSidebarComboList { } updateUiList(changedValues: Array) { + if (!this.elList) return; const elEmptyTip = this.elList.querySelector('.item.empty-list')!; queryElemChildren(this.elList, '.item:not(.empty-list)', (el) => el.remove()); for (const value of changedValues) { diff --git a/web_src/js/features/repo-issue.ts b/web_src/js/features/repo-issue.ts index 8da28f7f3a..5cbfac5692 100644 --- a/web_src/js/features/repo-issue.ts +++ b/web_src/js/features/repo-issue.ts @@ -566,6 +566,8 @@ function initIssueTemplateCommentEditors(commentForm: HTMLFormElement) { } export function initRepoCommentFormAndSidebar() { + initRepoIssueSidebar(); + const commentForm = document.querySelector('.comment.form'); if (!commentForm) return; @@ -576,6 +578,4 @@ export function initRepoCommentFormAndSidebar() { // it's quite unclear about the "comment form" elements, sometimes it's for issue comment, sometimes it's for file editor/uploader message initSingleCommentEditor(commentForm); } - - initRepoIssueSidebar(); }