mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-27 14:28:34 +00:00
Fix migrate input box bug
This commit is contained in:
parent
82c9589faa
commit
a8411b21a6
@ -34,8 +34,12 @@ export function initRepoMigration() {
|
||||
elCloneAddr.addEventListener('input', () => {
|
||||
if (repoNameChanged) return;
|
||||
let repoNameFromUrl = elCloneAddr.value.split(/[?#]/)[0];
|
||||
repoNameFromUrl = /^(.*\/)?((.+?)\/?)$/.exec(repoNameFromUrl)[3];
|
||||
repoNameFromUrl = repoNameFromUrl.split(/[?#]/)[0];
|
||||
const parts = /^(.*\/)?((.+?)\/?)$/.exec(repoNameFromUrl);
|
||||
if (!parts || parts.length < 4) {
|
||||
elRepoName.value = '';
|
||||
return;
|
||||
}
|
||||
repoNameFromUrl = parts[3].split(/[?#]/)[0];
|
||||
elRepoName.value = sanitizeRepoName(repoNameFromUrl);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user