diff --git a/src/_data/links.js b/src/_data/links.js index fd82af1a..817ffc53 100644 --- a/src/_data/links.js +++ b/src/_data/links.js @@ -39,6 +39,7 @@ export default async function () { const maxRequests = process.env.ELEVENTY_PRODUCTION ? 10 : 2 let nextPageCursor = null; let requestCount = 0; + let cachedLinks; if (process.env.ELEVENTY_PRODUCTION) { const cachedLinksOutput = await client.send( @@ -48,7 +49,7 @@ export default async function () { }) ) const cachedLinksData = getReadableData(cachedLinksOutput.Body) - const cachedLinks = await cachedLinksData.then((tracks) => JSON.parse(tracks)).catch() + cachedLinks = await cachedLinksData.then((tracks) => JSON.parse(tracks)).catch() } while (true) {