diff --git a/scripts/templates/index.js b/scripts/templates/index.js index 7a4d025a..18823bb4 100644 --- a/scripts/templates/index.js +++ b/scripts/templates/index.js @@ -5,14 +5,12 @@ Object.defineProperty(icons, "get", { value: function(targetName) { if (icons[targetName]) { return icons[targetName]; - } else { - var normalizedName = targetName.toLowerCase(); - for (var iconName in icons) { - var icon = icons[iconName]; - if ((icon.title && icon.title.toLowerCase() === normalizedName) - || (icon.slug && icon.slug === normalizedName)) { - return icon; - } + } + var normalizedName = targetName.toLowerCase(); + for (var iconName in icons) { + var icon = icons[iconName]; + if (icon.title.toLowerCase() === normalizedName || icon.slug === normalizedName) { + return icon; } } }