Fix JS failure when searching through catalog apps if an app is missing the optional description metadata field

This commit is contained in:
Bastian Hofmann 2020-05-22 16:45:53 +02:00
parent b66284d0b6
commit 1a17118e19
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,7 @@ export default Component.extend({
return all;
}
return all.filter((tpl) => tpl.name.toLowerCase().includes(search) || tpl.description.toLowerCase().includes(search));
return all.filter((tpl) => (tpl.name && tpl.name.toLowerCase().includes(search)) || (tpl.description && tpl.description.toLowerCase().includes(search)));
}),
arrangedContent: computed('matchingSearch.@each.categoryLowerArray', 'category', function() {