diff options
author | 2022-06-28 08:39:10 -0500 | |
---|---|---|
committer | 2022-06-28 08:39:10 -0500 | |
commit | 53bf0be280b9387c804098f75574b8402ebf8c0c (patch) | |
tree | 3bbfd3e616b8ae99fbd33f2419a9aef5546eb6cd /packages/integrations/prefetch/src/client.ts | |
parent | 768c8ed21db9114fa99d6d8d87e8f7ad4350f855 (diff) | |
download | astro-53bf0be280b9387c804098f75574b8402ebf8c0c.tar.gz astro-53bf0be280b9387c804098f75574b8402ebf8c0c.tar.zst astro-53bf0be280b9387c804098f75574b8402ebf8c0c.zip |
chore(lint): fix lint issues (#3743)
Co-authored-by: Nate Moore <nate@astro.build>
Diffstat (limited to 'packages/integrations/prefetch/src/client.ts')
-rw-r--r-- | packages/integrations/prefetch/src/client.ts | 4 |
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 {} } |