From 736571d55fa44d4ff29593b6e909d8ac4d726042 Mon Sep 17 00:00:00 2001 From: Arne Tarara Date: Fri, 4 Aug 2023 16:04:33 +0200 Subject: [PATCH] Ignore filesystem paths --- frontend/js/helpers/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/js/helpers/main.js b/frontend/js/helpers/main.js index 9a1dfcef5..5cf56e78e 100644 --- a/frontend/js/helpers/main.js +++ b/frontend/js/helpers/main.js @@ -33,9 +33,12 @@ class GMTMenu extends HTMLElement { customElements.define('gmt-menu', GMTMenu); const replaceRepoIcon = (uri) => { + + if(!uri.startsWith('http')) return uri; // ignore filesystem paths + const url = new URL(uri); - let iconClass = ""; + let iconClass = ""; switch (url.host) { case "github.com": case "www.github.com":