Commit 8e1046d9 authored by Lachlan Campbell's avatar Lachlan Campbell Committed by Joe Haddad

Fix error message typo: "Keys that need moved" (#9772)

parent ac9f1665
......@@ -472,7 +472,7 @@ export async function isPageStatic(
`\n\n\treturn { params: { ${_validParamKeys
.map(k => `${k}: ...`)
.join(', ')} } }` +
`\n\nKeys that need moved: ${invalidKeys.join(', ')}.\n`
`\n\nKeys that need to be moved: ${invalidKeys.join(', ')}.\n`
)
}
......
......@@ -433,7 +433,7 @@ export async function renderToHTML(
throw new Error(
`Additional keys were returned from \`getStaticProps\`. Properties intended for your component must be nested under the \`props\` key, e.g.:` +
`\n\n\treturn { props: { title: 'My Title', content: '...' } }` +
`\n\nKeys that need moved: ${invalidKeys.join(', ')}.`
`\n\nKeys that need to be moved: ${invalidKeys.join(', ')}.`
)
}
......
......@@ -13,7 +13,7 @@ describe('Legacy Prerender', () => {
expect(out.stderr).toMatch(`Build error occurred`)
expect(out.stderr).toMatch('Additional keys were returned from')
expect(out.stderr).toMatch('return { params: { foo: ..., post: ... } }')
expect(out.stderr).toMatch('Keys that need moved: foo, baz.')
expect(out.stderr).toMatch('Keys that need to be moved: foo, baz.')
})
})
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment