mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 02:37:42 +08:00
Fix 0s in notification dropdown
By casting the length int to a bool, if there are no badges, we don't display a 0. It seems that mithril will render integers, but not booleans. Fixes https://github.com/flarum/QualityAssurance/issues/28
This commit is contained in:
parent
8ffeac4315
commit
d1e987a240
|
@ -73,7 +73,7 @@ export default class NotificationList extends Component {
|
||||||
<div className="NotificationGroup">
|
<div className="NotificationGroup">
|
||||||
{group.discussion ? (
|
{group.discussion ? (
|
||||||
<Link className="NotificationGroup-header" href={app.route.discussion(group.discussion)}>
|
<Link className="NotificationGroup-header" href={app.route.discussion(group.discussion)}>
|
||||||
{badges && badges.length && <ul className="NotificationGroup-badges badges">{listItems(badges)}</ul>}
|
{badges && !!badges.length && <ul className="NotificationGroup-badges badges">{listItems(badges)}</ul>}
|
||||||
<span>{group.discussion.title()}</span>
|
<span>{group.discussion.title()}</span>
|
||||||
</Link>
|
</Link>
|
||||||
) : (
|
) : (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user