linkcheck correction
This commit is contained in:
parent
81b08898ba
commit
cb298c8c90
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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(
|
||||
`--------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue