mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
[ci] format
This commit is contained in:
parent
4c1b769bcf
commit
85de47cd98
4 changed files with 4 additions and 6 deletions
|
@ -30,7 +30,7 @@ async function loadLocalImage(src: string, url: URL) {
|
|||
if (!isAbsolute(filePath) || !filePath.startsWith(assetsDirPath)) {
|
||||
return undefined;
|
||||
}
|
||||
} catch{
|
||||
} catch {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -179,9 +179,7 @@ async function renderFrameworkComponent(
|
|||
// Attempt: can we guess the renderer from the export extension?
|
||||
if (!renderer) {
|
||||
const extname = metadata.componentUrl?.split('.').pop();
|
||||
renderer = renderers.find(
|
||||
({ name }) => name === `@astrojs/${extname}` || name === extname
|
||||
);
|
||||
renderer = renderers.find(({ name }) => name === `@astrojs/${extname}` || name === extname);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ export default function loadFallbackPlugin({
|
|||
try {
|
||||
// await is necessary for the catch
|
||||
return await fs.promises.readFile(cleanUrl(id), 'utf-8');
|
||||
} catch{
|
||||
} catch {
|
||||
try {
|
||||
return await fs.promises.readFile(id, 'utf-8');
|
||||
} catch {
|
||||
|
|
Loading…
Reference in a new issue