0
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-18 19:39:33 +01:00

Fix clone panel js error (#32798)

side effect of jquery removal, fix #32797
This commit is contained in:
wxiaoguang 2024-12-12 10:01:20 +08:00 committed by GitHub
parent 1893b32670
commit 17f0411441
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -75,12 +75,12 @@ function initCloneSchemeUrlSelection(parent: Element) {
}; };
updateClonePanelUi(); updateClonePanelUi();
// tabSsh or tabHttps might not both exist, eg: guest view, or one is disabled by the server
tabSsh.addEventListener('click', () => { tabSsh?.addEventListener('click', () => {
localStorage.setItem('repo-clone-protocol', 'ssh'); localStorage.setItem('repo-clone-protocol', 'ssh');
updateClonePanelUi(); updateClonePanelUi();
}); });
tabHttps.addEventListener('click', () => { tabHttps?.addEventListener('click', () => {
localStorage.setItem('repo-clone-protocol', 'https'); localStorage.setItem('repo-clone-protocol', 'https');
updateClonePanelUi(); updateClonePanelUi();
}); });