mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-04-08 02:31:36 +02:00
fix: make repo clone https/ssh listener conditional
- It's possible that either the SSH or HTTPS element does not exist. Thus make adding the event listener conditional. - Ref: forgejo/forgejo#7408 - Reported-by: @0ko
This commit is contained in:
parent
5706a2452e
commit
4ff1288194
1 changed files with 2 additions and 2 deletions
|
@ -41,11 +41,11 @@ export function initRepoCloneLink() {
|
|||
return;
|
||||
}
|
||||
|
||||
repoCloneSSH.addEventListener('click', () => {
|
||||
repoCloneSSH?.addEventListener('click', () => {
|
||||
localStorage.setItem('repo-clone-protocol', 'ssh');
|
||||
window.updateCloneStates();
|
||||
});
|
||||
repoCloneHTTPS.addEventListener('click', () => {
|
||||
repoCloneHTTPS?.addEventListener('click', () => {
|
||||
localStorage.setItem('repo-clone-protocol', 'https');
|
||||
window.updateCloneStates();
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue