aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2025-03-30 03:30:27 +0800
committerGitHub <noreply@github.com>2025-03-29 12:30:27 -0700
commitdd901983c0a3a6087f6a83f95453f4f484bc0ff0 (patch)
tree06a68fa54897ff16229e6aa975752735ca43f119
parent7f962a16c9d8c02e822a2fdea4cf2e0c584fad21 (diff)
downloadgitea-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.ts2
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');