mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Be less tolerant of broken grasp server lists
This commit is contained in:
1 file changed
+2
-3
+2
-3
@@ -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(() => {
|
||||
|
||||
Reference in new issue
Block a user