From 8ef1d3bdeaad02058019d31265b56ed24eb93ead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sevilla=20Mart=C3=ADn?= Date: Sun, 7 Jul 2019 11:23:22 -0400 Subject: [PATCH] Fix default value for useColor overriding falsy values (#63) This would make the 'useColor' setting irrelevant as it would always be true. Error is noticeable in the discussion list when the icons are the same color as the tag background --- extensions/tags/js/src/common/helpers/tagIcon.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/tags/js/src/common/helpers/tagIcon.js b/extensions/tags/js/src/common/helpers/tagIcon.js index 1e5ba9066..d091f04e0 100644 --- a/extensions/tags/js/src/common/helpers/tagIcon.js +++ b/extensions/tags/js/src/common/helpers/tagIcon.js @@ -1,6 +1,6 @@ export default function tagIcon(tag, attrs = {}, settings = {}) { const hasIcon = tag && tag.icon(); - const useColor = settings.useColor || true; + const { useColor = true } = settings; attrs.className = hasIcon ? 'icon ' + tag.icon() + ' ' + (attrs.className || '') : 'icon TagIcon ' + (attrs.className || '');