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)) {
|
if (!isAbsolute(filePath) || !filePath.startsWith(assetsDirPath)) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
} catch{
|
} catch {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,9 +179,7 @@ async function renderFrameworkComponent(
|
||||||
// Attempt: can we guess the renderer from the export extension?
|
// Attempt: can we guess the renderer from the export extension?
|
||||||
if (!renderer) {
|
if (!renderer) {
|
||||||
const extname = metadata.componentUrl?.split('.').pop();
|
const extname = metadata.componentUrl?.split('.').pop();
|
||||||
renderer = renderers.find(
|
renderer = renderers.find(({ name }) => name === `@astrojs/${extname}` || name === extname);
|
||||||
({ name }) => name === `@astrojs/${extname}` || name === extname
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -290,7 +290,7 @@ async function updateDOM(
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
await animate('old');
|
await animate('old');
|
||||||
} catch {
|
} catch {
|
||||||
// animate might reject as a consequence of a call to skipTransition()
|
// animate might reject as a consequence of a call to skipTransition()
|
||||||
// ignored on purpose
|
// ignored on purpose
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ export default function loadFallbackPlugin({
|
||||||
try {
|
try {
|
||||||
// await is necessary for the catch
|
// await is necessary for the catch
|
||||||
return await fs.promises.readFile(cleanUrl(id), 'utf-8');
|
return await fs.promises.readFile(cleanUrl(id), 'utf-8');
|
||||||
} catch{
|
} catch {
|
||||||
try {
|
try {
|
||||||
return await fs.promises.readFile(id, 'utf-8');
|
return await fs.promises.readFile(id, 'utf-8');
|
||||||
} catch {
|
} catch {
|
||||||
|
|
Loading…
Reference in a new issue