Skip to content

AI-native design editor. Open-source Figma alternative.

fix(tauri-fetch): correctly extract URL from Request input

Mohammad Zaidd3097067f343
diff --git a/src/app/tauri/http.ts b/src/app/tauri/http.ts
index 129d8b9c6..5f59729f3 100644
--- a/src/app/tauri/http.ts
+++ b/src/app/tauri/http.ts
@@ -81,7 +81,7 @@ export async function tauriFetch(
maxResponseBytes?: number,
timeoutMs?: number
): Promise<Response> {
- const parsedURL = new URL(typeof input === 'object' ? (input as Request).url : input)
+ const parsedURL = new URL(input instanceof Request ? input.url : input)
const isIpcURL =
parsedURL.protocol === 'ipc:' ||
((parsedURL.protocol === 'http:' || parsedURL.protocol === 'https:') &&