mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
[ci] yarn format
This commit is contained in:
parent
920d3da135
commit
638982663e
2 changed files with 4 additions and 4 deletions
|
@ -75,12 +75,12 @@ export function extractDirectives(inputProps: Record<string | number, any>): Ext
|
|||
|
||||
// throw an error if an invalid hydration directive was provided
|
||||
if (HydrationDirectives.indexOf(extracted.hydration.directive) < 0) {
|
||||
throw new Error(`Error: invalid hydration directive "${key}". Supported hydration methods: ${HydrationDirectives.map(d => `"client:${d}"`).join(', ')}`)
|
||||
throw new Error(`Error: invalid hydration directive "${key}". Supported hydration methods: ${HydrationDirectives.map((d) => `"client:${d}"`).join(', ')}`);
|
||||
}
|
||||
|
||||
// throw an error if the query wasn't provided for client:media
|
||||
if (extracted.hydration.directive === 'media' && typeof extracted.hydration.value !== 'string') {
|
||||
throw new Error('Error: Media query must be provided for "client:media", similar to client:media="(max-width: 600px)"')
|
||||
throw new Error('Error: Media query must be provided for "client:media", similar to client:media="(max-width: 600px)"');
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue