From 6771df128e2be04b061662212d1ed24d555bf21a Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Tue, 20 Mar 2018 18:02:48 +0800 Subject: [PATCH] Fix the build. --- .../javascripts/discourse/controllers/groups.js.es6 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/groups.js.es6 b/app/assets/javascripts/discourse/controllers/groups.js.es6 index ab876339ae3..35cfbf1dc38 100644 --- a/app/assets/javascripts/discourse/controllers/groups.js.es6 +++ b/app/assets/javascripts/discourse/controllers/groups.js.es6 @@ -13,9 +13,11 @@ export default Ember.Controller.extend({ types(typeFilters) { const types = []; - typeFilters.forEach(type => { - types.push({ id: type, name: I18n.t(`groups.index.${type}_groups`) }); - }); + if (typeFilters) { + typeFilters.forEach(type => { + types.push({ id: type, name: I18n.t(`groups.index.${type}_groups`) }); + }); + } return types; },