From 0a69777cc9bfb6ca740b8cb7aa6a9110439fdd44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ben=20Z=C3=B6rb?= Date: Mon, 22 Apr 2024 00:10:41 +0200 Subject: [PATCH] cleanup --- src/file.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/file.js b/src/file.js index e7993da..d38756d 100644 --- a/src/file.js +++ b/src/file.js @@ -771,7 +771,7 @@ export async function getAssetPaths(document, file, options = {}, strict = true) */ export async function vinylize(src, options = {}) { const {filepath, html} = src; - const {rebase = {}} = options; + const {rebase = {}, request = {}} = options; const file = new Vinyl(); file.cwd = '/'; file.remote = false; @@ -792,7 +792,7 @@ export async function vinylize(src, options = {}) { } else if (filepath && isRemote(filepath)) { let url = filepath; try { - const response = await fetch(filepath, {...options, request: {...options.request, method: 'head'}}); + const response = await fetch(filepath, {...options, request: {...request, method: 'head'}}); if (response.url !== url) { debug(`(vinylize) found redirect from ${url} to ${response.url}`); url = response.url;