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
This commit is contained in:
David Sevilla Martín 2019-07-07 11:23:22 -04:00 committed by Franz Liedke
parent 7dd69e119e
commit 8ef1d3bdea

View File

@ -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 || '');