mirror of
https://github.com/flarum/framework.git
synced 2024-12-01 22:43:41 +08:00
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:
parent
7dd69e119e
commit
8ef1d3bdea
|
@ -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 || '');
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user