Skip to content

Commit 9e93484

Browse files
authored
Merge branch 'v2' into renovate/astro-and-starlight-packages
2 parents bac8312 + c52fd97 commit 9e93484

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

src/assets/fallback.jpg

1.94 KB
Loading

src/components/sponsors/OpenCollective/OcAvatar.astro

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { Image } from 'astro:assets';
33
import { OC_IMAGE_DIMENSION } from 'packages/fetch-sponsors/config';
44
import { type OpenCollectiveSponsor as Sponsor } from 'packages/fetch-sponsors/types';
5+
import fallbackImage from 'src/assets/fallback.jpg';
56
67
interface Props {
78
sponsor: Sponsor;
@@ -18,6 +19,11 @@ const roundingStyle: Record<Sponsor['type'], string> = {
1819
function getUrl(sponsor: Sponsor): string {
1920
return `${sponsor.socialLinks?.website ?? sponsor.profileUrl}?ref=tauri.app&utm_source=tauri.app`;
2021
}
22+
23+
const res = await fetch(sponsor.avatarUrl, { method: 'HEAD' });
24+
if (res && !res.ok) {
25+
sponsor.avatarUrl = fallbackImage.src;
26+
}
2127
---
2228

2329
{

src/content/docs/develop/Tests/WebDriver/Example/webdriverio.mdx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,15 @@ export const config = {
113113
// ensure the rust project is built since we expect this binary to exist for the webdriver sessions
114114
onPrepare: () => {
115115
// Remove the extra `--` if you're not using npm!
116-
spawnSync('npm', ['run', 'tauri', 'build', '--', '--debug', '--no-bundle'], {
117-
cwd: path.resolve(__dirname, '..'),
118-
stdio: 'inherit',
119-
shell: true,
120-
});
116+
spawnSync(
117+
'npm',
118+
['run', 'tauri', 'build', '--', '--debug', '--no-bundle'],
119+
{
120+
cwd: path.resolve(__dirname, '..'),
121+
stdio: 'inherit',
122+
shell: true,
123+
}
124+
);
121125
},
122126

123127
// ensure we are running `tauri-driver` before the session starts so that we can proxy the webdriver requests

0 commit comments

Comments
 (0)