FelixTDT 4 months ago
parent
commit
972dbd55e5
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/app/home/home.page.ts

+ 3 - 3
src/app/home/home.page.ts

@@ -40,9 +40,9 @@ export class HomePage implements OnInit {
 
 
   onSearch(event: any) {
   onSearch(event: any) {
     const query = event.target.value.toLowerCase();
     const query = event.target.value.toLowerCase();
-    this.filteredItems = this.items.filter(item =>
-      item.title.toLowerCase().includes(query) ||
-      item.description.toLowerCase().includes(query)
+    this.filteredItems = this.items.filter(item => 
+      (item.title && item.title.toLowerCase().includes(query)) || 
+      (item.description && item.description.toLowerCase().includes(query))
     );
     );
   }
   }