From dd901983c0a3a6087f6a83f95453f4f484bc0ff0 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sun, 30 Mar 2025 03:30:27 +0800 Subject: [PATCH] Fix repo-template.ts error in 1.23 (#34060) Fix #34059 --- web_src/js/features/repo-template.ts | 2 ++ 1 file changed, 2 insertions(+) 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');