Skip to content

Commit

Permalink
🐛 Catch fallback icon on secret sites
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Dec 6, 2020
1 parent 5a36861 commit ae1190e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,15 @@ export const generateSummary = async () => {
const responseTimes = await getResponseTimeForSite(slug);
console.log("Response times", responseTimes);

let fallbackIcon = "";
try {
fallbackIcon = `https://favicons.githubusercontent.com/fallback-icon`;
} catch (error) {}

pageStatuses.push({
name: site.name,
url: site.url,
icon: site.icon || `https://favicons.githubusercontent.com/${new URL(site.url).hostname}`,
icon: site.icon || fallbackIcon,
slug,
status: responseTimes.currentStatus,
uptime: uptimes.all,
Expand Down

0 comments on commit ae1190e

Please sign in to comment.