diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2025-03-30 03:30:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-29 12:30:27 -0700 |
commit | dd901983c0a3a6087f6a83f95453f4f484bc0ff0 (patch) | |
tree | 06a68fa54897ff16229e6aa975752735ca43f119 | |
parent | 7f962a16c9d8c02e822a2fdea4cf2e0c584fad21 (diff) | |
download | gitea-dd901983c0a3a6087f6a83f95453f4f484bc0ff0.tar.gz gitea-dd901983c0a3a6087f6a83f95453f4f484bc0ff0.zip |
Fix repo-template.ts error in 1.23 (#34060)
Fix #34059
-rw-r--r-- | web_src/js/features/repo-template.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/web_src/js/features/repo-template.ts b/web_src/js/features/repo-template.ts index 0a689e803f..f3d79eba80 100644 --- a/web_src/js/features/repo-template.ts +++ b/web_src/js/features/repo-template.ts @@ -6,6 +6,8 @@ const {appSubUrl} = window.config; export function initRepoTemplateSearch() { const $repoTemplate = $('#repo_template'); + if (!$repoTemplate.length) return; // make sure the current page is "new repo" page + const checkTemplate = function () { const $templateUnits = $('#template_units'); const $nonTemplate = $('#non_template'); |