[Fix] 修复repo/migrate页面报错 Uncaught TypeError: Cannot read properties of undefined (reading 'match')
All checks were successful
DevStar Studio CI Pipeline - dev branch / build-and-push-x86-64-docker-image (push) Successful in 12m59s

* 修复repo/migrate页面报错repo-template.js:22 Uncaught TypeError: Cannot read …
This commit is contained in:
孟宁
2024-12-05 08:31:14 +00:00
committed by 戴明辰
parent 294175a836
commit 4a55a192bb

View File

@@ -98,9 +98,10 @@ export function initRepoTemplateSearch() {
showElem($repoTemplateArea);
}
};
$gitURLTemplate.on('change', checkGitURLTemplate);
checkGitURLTemplate();
if($gitURLTemplate.length){
$gitURLTemplate.on('change', checkGitURLTemplate);
checkGitURLTemplate();
}
const checkDevStarTemplate = function () {
if ($devstarTemplate.val() !== '' && $devstarTemplate.val() !== '0') {
@@ -121,7 +122,9 @@ export function initRepoTemplateSearch() {
showElem($nonTemplate);
}
};
$devstarTemplate.on('change', checkDevStarTemplate);
if($devstarTemplate.length){
$devstarTemplate.on('change', checkDevStarTemplate);
}
const initDevStarTemplateSearch = function () {
$('#devstar_template_search')