fetchAvatar() return default avatar if failed.

This commit is contained in:
LuckyLaszlo
2023-01-15 00:01:32 +01:00
parent b72042a263
commit fcb23c84e1
3 changed files with 1 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

View File

@@ -13,6 +13,7 @@ export async function fetchAvatar(username: string)
})
.catch((error) => {
console.log("catch fetchAvatar: ", error);
return `http://${process.env.WEBSITE_HOST}:${process.env.WEBSITE_PORT}/img/default.png`;
});
}