Skip to content

Commit 17f0411

Browse files
authored
Fix clone panel js error (#32798)
side effect of jquery removal, fix #32797
1 parent 1893b32 commit 17f0411

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

web_src/js/features/repo-common.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ function initCloneSchemeUrlSelection(parent: Element) {
7575
};
7676

7777
updateClonePanelUi();
78-
79-
tabSsh.addEventListener('click', () => {
78+
// tabSsh or tabHttps might not both exist, eg: guest view, or one is disabled by the server
79+
tabSsh?.addEventListener('click', () => {
8080
localStorage.setItem('repo-clone-protocol', 'ssh');
8181
updateClonePanelUi();
8282
});
83-
tabHttps.addEventListener('click', () => {
83+
tabHttps?.addEventListener('click', () => {
8484
localStorage.setItem('repo-clone-protocol', 'https');
8585
updateClonePanelUi();
8686
});

0 commit comments

Comments
 (0)