summaryrefslogtreecommitdiff
path: root/packages/integrations/prefetch
diff options
context:
space:
mode:
Diffstat (limited to 'packages/integrations/prefetch')
-rw-r--r--packages/integrations/prefetch/src/client.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/integrations/prefetch/src/client.ts b/packages/integrations/prefetch/src/client.ts
index 9f951c8dd..fae2db54a 100644
--- a/packages/integrations/prefetch/src/client.ts
+++ b/packages/integrations/prefetch/src/client.ts
@@ -1,4 +1,4 @@
-/// <reference path="../@types/network-information.d.ts" />
+import "../@types/network-information.d.ts";
import throttles from 'throttles';
import requestIdleCallback from './requestIdleCallback.js';
@@ -53,7 +53,7 @@ async function preloadHref(link: HTMLAnchorElement) {
const html = parser.parseFromString(contents, 'text/html');
const styles = Array.from(html.querySelectorAll<HTMLLinkElement>('link[rel="stylesheet"]'));
- await Promise.all(styles.map(({ href }) => fetch(href)));
+ await Promise.all(styles.map((el) => fetch(el.href)));
} catch {}
}