diff --git a/index.js b/index.js index b565ac7..057bfdc 100644 --- a/index.js +++ b/index.js @@ -39,8 +39,11 @@ Handlebars.registerHelper('formatURL', url => url.replace(/^(https?:|)\/\//, '').replace(/\/$/, ''), ) -Handlebars.registerHelper('icon', name => - icons[name].toSvg({ width: 16, height: 16 }), +Handlebars.registerHelper('icon', (name, fallback) => + (icons[name.toLowerCase()] || icons[fallback.toLowerCase()]).toSvg({ + width: 16, + height: 16, + }), ) Handlebars.registerHelper('join', (arr, separator) => diff --git a/partials/header.hbs b/partials/header.hbs index 08178d3..0b367a6 100644 --- a/partials/header.hbs +++ b/partials/header.hbs @@ -36,7 +36,7 @@ {{/url}} {{#profiles}}