From: vlorian Date: Mon, 28 Aug 2023 15:53:13 +0000 (+0200) Subject: Handling empty groups in search function X-Git-Tag: v23.10.1~1 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;ds=sidebyside;h=ecf664d19b2a46c9d89a9a9c1128e22b7228607a;p=github%2Fbastienwirtz%2Fhomer.git Handling empty groups in search function --- diff --git a/src/App.vue b/src/App.vue index 446db31..a329775 100644 --- a/src/App.vue +++ b/src/App.vue @@ -283,9 +283,11 @@ export default { const searchResultItems = []; for (const group of this.config.services) { - for (const item of group.items) { - if (this.matchesFilter(item)) { - searchResultItems.push(item); + if (group.items !== null) { + for (const item of group.items) { + if (this.matchesFilter(item)) { + searchResultItems.push(item); + } } } }