From 6a25a62e631ce39fd02bb0fd08001157e7589b9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Thu, 3 Sep 2015 11:56:33 +0200 Subject: [PATCH] FIX: make sure we have a category --- app/assets/javascripts/discourse/models/topic-list.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/models/topic-list.js.es6 b/app/assets/javascripts/discourse/models/topic-list.js.es6 index cf65eb212ac..742abdac406 100644 --- a/app/assets/javascripts/discourse/models/topic-list.js.es6 +++ b/app/assets/javascripts/discourse/models/topic-list.js.es6 @@ -165,7 +165,7 @@ TopicList.reopenClass({ // hide the category when it has no children hideUniformCategory(list, category) { - list.set('hideCategory', !category.get("has_children")); + list.set('hideCategory', category && !category.get("has_children")); } });