mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-03-16 22:36:25 +00:00
Compare commits
1 Commits
develop
...
fix-networ
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e0bafae81 |
@@ -24,7 +24,7 @@ const NetworkStatusContext = createContext<NetworkStatusContextType | null>(
|
|||||||
async function checkApiReachable(basePath?: string): Promise<boolean> {
|
async function checkApiReachable(basePath?: string): Promise<boolean> {
|
||||||
if (!basePath) return false;
|
if (!basePath) return false;
|
||||||
try {
|
try {
|
||||||
const response = await fetch(basePath, { method: "HEAD" });
|
const response = await fetch(basePath + "/", { method: "HEAD" });
|
||||||
return response.ok;
|
return response.ok;
|
||||||
} catch {
|
} catch {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user