From e848d9878285a206a04725a9e21480194e701a5c Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Wed, 11 Mar 2020 00:58:46 +0100 Subject: [PATCH] FIX: ensures category exists for hideParent in categoryBadgeHTML (#9161) --- .../javascripts/select-kit/components/category-chooser.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/select-kit/components/category-chooser.js.es6 b/app/assets/javascripts/select-kit/components/category-chooser.js.es6 index d929bfac3ef..76c47a6a180 100644 --- a/app/assets/javascripts/select-kit/components/category-chooser.js.es6 +++ b/app/assets/javascripts/select-kit/components/category-chooser.js.es6 @@ -54,7 +54,7 @@ export default ComboBoxComponent.extend({ "label", categoryBadgeHTML(category, { link: false, - hideParent: !!category.parent_category_id, + hideParent: category ? !!category.parent_category_id : true, allowUncategorized: true, recursive: true }).htmlSafe()