mirror of
https://github.com/withastro/astro.git
synced 2025-03-24 23:21:57 -05:00
[ci] format
This commit is contained in:
parent
34da907f3b
commit
242be51618
1 changed files with 7 additions and 1 deletions
|
@ -65,7 +65,13 @@ export async function scan(
|
|||
.trim();
|
||||
// For a given export, check the value of the first non-whitespace token.
|
||||
// Basically extract the `true` from the statement `export const prerender = true`
|
||||
const suffix = code.slice(endOfLocalName).trim().replace(/=/, '').trim().split(/[;\n\r]/)[0].trim();
|
||||
const suffix = code
|
||||
.slice(endOfLocalName)
|
||||
.trim()
|
||||
.replace(/=/, '')
|
||||
.trim()
|
||||
.split(/[;\n\r]/)[0]
|
||||
.trim();
|
||||
if (prefix !== 'const' || !(isTruthy(suffix) || isFalsy(suffix))) {
|
||||
throw new AstroError({
|
||||
...AstroErrorData.InvalidPrerenderExport,
|
||||
|
|
Loading…
Add table
Reference in a new issue