From 0289a3b71468dc27797d9862ce685fff1fb6fa71 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Fri, 14 May 2021 21:08:48 -0400 Subject: [PATCH] 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 --- framework/core/js/src/forum/components/NotificationList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/js/src/forum/components/NotificationList.js b/framework/core/js/src/forum/components/NotificationList.js index f469dd00d..be100e780 100644 --- a/framework/core/js/src/forum/components/NotificationList.js +++ b/framework/core/js/src/forum/components/NotificationList.js @@ -73,7 +73,7 @@ export default class NotificationList extends Component {
{group.discussion ? ( - {badges && badges.length && } + {badges && !!badges.length && } {group.discussion.title()} ) : (