linkcheck correction

This commit is contained in:
Jeff Escalante 2020-04-07 17:50:07 -04:00
parent 81b08898ba
commit cb298c8c90
No known key found for this signature in database
GPG Key ID: 32D23C61AB5450DB
2 changed files with 4 additions and 4 deletions

View File

@ -67,6 +67,6 @@
"lint": "next-hashicorp lint",
"start": "rm -rf .next/cache/next-babel-loader/ && next dev",
"static": "npm run build && npm run export && cp _redirects out/.",
"linkcheck": "linkcheck https://www.packer.io"
"linkcheck": "linkcheck https://packer.io"
}
}

View File

@ -19,8 +19,8 @@ export default function DownloadsPage({ downloadData }) {
export async function getStaticProps() {
return fetch(`https://releases.hashicorp.com/packer/${VERSION}/index.json`)
.then(r => r.json())
.then(r => {
.then((r) => r.json())
.then((r) => {
// TODO: restructure product-downloader to run this logic internally
return r.builds.reduce((acc, build) => {
if (!acc[build.os]) acc[build.os] = {}
@ -28,7 +28,7 @@ export async function getStaticProps() {
return acc
}, {})
})
.then(r => ({ props: { downloadData: r } }))
.then((r) => ({ props: { downloadData: r } }))
.catch(() => {
throw new Error(
`--------------------------------------------------------