Skip to content

Commit e2bc30f

Browse files
committed
fix: handle unknown scheme in initCloneSchemeUrlSection
Signed-off-by: Quentin Guidée <[email protected]>
1 parent fdc95c2 commit e2bc30f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

web_src/js/features/repo-common.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ function initCloneSchemeUrlSelection(parent: Element) {
5858
const tabTea = parent.querySelector('.repo-clone-tea');
5959
const updateClonePanelUi = function() {
6060
let scheme = localStorage.getItem('repo-clone-protocol') || 'https';
61+
if (!['https', 'ssh', 'tea'].includes(scheme)) {
62+
scheme = 'https';
63+
}
6164

6265
// Fallbacks if the scheme preference is not available in the tabs.
6366
if (scheme === 'tea' && !tabTea) {

0 commit comments

Comments
 (0)