()
| 4 | // window itself exists. Guard both so module initialization cannot throw and leave |
| 5 | // downstream importers with a TDZ-poisoned export. |
| 6 | function readInitialAppProxyBasePath(): string | null { |
| 7 | if (typeof window === "undefined") { |
| 8 | return null; |
| 9 | } |
| 10 | |
| 11 | const location = (window as { location?: { pathname?: string } }).location; |
| 12 | if (!location || typeof location.pathname !== "string") { |
| 13 | return null; |
| 14 | } |
| 15 | |
| 16 | return getAppProxyBasePathFromPathname(location.pathname); |
| 17 | } |
| 18 | |
| 19 | export const INITIAL_APP_PROXY_BASE_PATH = readInitialAppProxyBasePath(); |
| 20 |
no test coverage detected