]> git.immae.eu Git - github/bastienwirtz/homer.git/commitdiff
Handling empty groups in search function
authorvlorian <vlorian@vlorian.de>
Mon, 28 Aug 2023 15:53:13 +0000 (17:53 +0200)
committerBastien Wirtz <bastien.wirtz@gmail.com>
Sat, 21 Oct 2023 12:18:47 +0000 (05:18 -0700)
src/App.vue

index 446db31a6685ff02eb50cc97d52df776fb7b4151..a329775d789f7c9266834fb1f45ffcbef5bb3d7c 100644 (file)
@@ -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);
+            }
           }
         }
       }