From 85db6cd2d7c564d72d13ed451df6ece4c99cc917 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Fri, 2 Feb 2018 02:13:06 +0100 Subject: [PATCH] FIX: makes sure we have a content to filter --- .../javascripts/select-kit/components/category-drop.js.es6 | 2 +- app/assets/javascripts/select-kit/components/tag-drop.js.es6 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/select-kit/components/category-drop.js.es6 b/app/assets/javascripts/select-kit/components/category-drop.js.es6 index 6cf0052e1f9..7ff78acaaf9 100644 --- a/app/assets/javascripts/select-kit/components/category-drop.js.es6 +++ b/app/assets/javascripts/select-kit/components/category-drop.js.es6 @@ -38,7 +38,7 @@ export default ComboBoxComponent.extend({ @computed("content") filterable(content) { - return content.length >= 15; + return content && content.length >= 15; }, @computed("allCategoriesUrl", "allCategoriesLabel", "noCategoriesUrl", "noCategoriesLabel") diff --git a/app/assets/javascripts/select-kit/components/tag-drop.js.es6 b/app/assets/javascripts/select-kit/components/tag-drop.js.es6 index 23092bb6a2a..79e9f017cff 100644 --- a/app/assets/javascripts/select-kit/components/tag-drop.js.es6 +++ b/app/assets/javascripts/select-kit/components/tag-drop.js.es6 @@ -33,7 +33,7 @@ export default ComboBoxComponent.extend({ @computed("content") filterable(content) { - return content.length >= 15; + return content && content.length >= 15; }, computeHeaderContent() {