()
| 2 | import { isValidHttpUrl } from '../../lib/links'; |
| 3 | |
| 4 | export const getWebappHost = (): string | undefined => { |
| 5 | try { |
| 6 | return new URL(webappUrl, globalThis.location?.origin).host; |
| 7 | } catch { |
| 8 | return globalThis.location?.host; |
| 9 | } |
| 10 | }; |
| 11 | |
| 12 | // The comment reference arrives in a stanza the peer controls, so its link is |
| 13 | // only rendered when it is an http(s) URL on our own webapp. React would |
no outgoing calls
no test coverage detected