Skip to contentSkip to conversation

consoleview: fix handling of undefined URL strings

PATCH Superseded Mathieu Dubois-Briand 1 participant 1 message Nov 8, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 consoleview: fix handling of undefined URL strings

Some errors were observed on the console view when the URL string is undefined. Reason for undefined URLs is unexplained so far, but we should at least try to not generate any JS exception.

---
 yocto_console_view/src/views/ConsoleView/ConsoleView.tsx | 4 ++++
 1 file changed, 4 insertions(+)
yocto_console_view/src/views/ConsoleView/ConsoleView.tsx +4 -0
index 16569ea9eac8..a30402a9a335 100644
@@ -156,6 +156,10 @@ const gitHostAliases = new Map([
 
 function getHttpURL(url)
 {
+       if (url === undefined) {
+               return url;
+       }
+
        let u = new URL(url.replace(RegExp("^[a-z]*://"), "https://"));
        u.username = "";
        if (gitHostAliases.has(u.host)) {

---
base-commit: fdc34623463b1c708220021649ba4b8b53db3dbf
change-id: 20251108-mathieu-fix-url-replace-7f62a4fa56b0

Best regards,

Signature · 1 line
Mathieu Dubois-Briand <[email protected]>