loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: make repo clone https/ssh listener conditional (#7431)

- 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

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7431
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>

authored by

Gusted
Gusted
and committed by
Gusted
ee5b1021 5706a245

+2 -2
+2 -2
web_src/js/features/repo-common.js
··· 41 41 return; 42 42 } 43 43 44 - repoCloneSSH.addEventListener('click', () => { 44 + repoCloneSSH?.addEventListener('click', () => { 45 45 localStorage.setItem('repo-clone-protocol', 'ssh'); 46 46 window.updateCloneStates(); 47 47 }); 48 - repoCloneHTTPS.addEventListener('click', () => { 48 + repoCloneHTTPS?.addEventListener('click', () => { 49 49 localStorage.setItem('repo-clone-protocol', 'https'); 50 50 window.updateCloneStates(); 51 51 });