fix: gracefully handle contributor fetch faliure

This commit is contained in:
edideaur 2026-04-04 21:53:05 +00:00 committed by GitHub
parent c73572e195
commit 2c9ac1ecb1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -127,7 +127,9 @@ async function loadDownloadsModule() {
}
async function fetchcontributors() {
try {
const response = await fetch('https://api.samidy.com/api/contributors');
if (!response.ok) return;
const data1 = await response.json();
const data = data1.filter(
@ -141,6 +143,7 @@ async function fetchcontributors() {
}
const con = document.querySelector('.about-contributors');
if (!con) return;
data.forEach((user) => {
const userDIV = document.createElement('div');
@ -153,6 +156,7 @@ async function fetchcontributors() {
`;
con.appendChild(userDIV);
});
} catch (e) {}
}
async function loadMetadataModule() {