We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1893b32 commit 17f0411Copy full SHA for 17f0411
web_src/js/features/repo-common.ts
@@ -75,12 +75,12 @@ function initCloneSchemeUrlSelection(parent: Element) {
75
};
76
77
updateClonePanelUi();
78
-
79
- tabSsh.addEventListener('click', () => {
+ // tabSsh or tabHttps might not both exist, eg: guest view, or one is disabled by the server
+ tabSsh?.addEventListener('click', () => {
80
localStorage.setItem('repo-clone-protocol', 'ssh');
81
82
});
83
- tabHttps.addEventListener('click', () => {
+ tabHttps?.addEventListener('click', () => {
84
localStorage.setItem('repo-clone-protocol', 'https');
85
86
0 commit comments