diff --git a/web_src/js/bootstrap.js b/web_src/js/bootstrap.js index 698d17fa36..3034478190 100644 --- a/web_src/js/bootstrap.js +++ b/web_src/js/bootstrap.js @@ -23,7 +23,7 @@ export function showGlobalErrorMessage(msg) { let msgDiv = pageContent.querySelector(`.js-global-error[data-global-error-msg-compact="${msgCompact}"]`); if (!msgDiv) { const el = document.createElement('div'); - el.innerHTML = `
`; + el.innerHTML = ``; msgDiv = el.childNodes[0]; } // merge duplicated messages into "the message (count)" format diff --git a/web_src/js/features/repo-common.js b/web_src/js/features/repo-common.js index 9e11ffe197..669b47a9c5 100644 --- a/web_src/js/features/repo-common.js +++ b/web_src/js/features/repo-common.js @@ -76,6 +76,8 @@ export function initRepoCommonBranchOrTagDropdown(selector) { export function initRepoCommonFilterSearchDropdown(selector) { const $dropdown = $(selector); + if (!$dropdown.length) return; + $dropdown.dropdown({ fullTextSearch: 'exact', selectOnKeydown: false,