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

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Mohammad Zaid 2026-09-13 15:47:40 +03:00 committed by GitHub
parent 7b3e09dae7
commit d3097067f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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:') &&