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:
parent
7b3e09dae7
commit
d3097067f3
|
|
@ -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:') &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue