Be less tolerant of broken grasp server lists

This commit is contained in:
Alex Gleason committed 2025-12-22 19:20:46 -06:00
1 parent f5010518e2
commit a415a7c5bc
1 file changed
+2 -3
+2 -3
View File
@@ -21,10 +21,9 @@ export function useGit(): { git: Git } {
const url = new URL(r.url);
return url.hostname;
} catch {
// Fallback: try to extract hostname from URL string
return r.url.replace(/^wss?:\/\//, '').replace(/\/.*$/, '');
return undefined;
}
});
}).filter((hostname): hostname is string => Boolean(hostname));
}, [graspMetadata.relays]);
const git = useMemo(() => {