mirror of
https://github.com/Lissy93/dashy.git
synced 2024-11-30 11:32:10 +03:00
Fix filter issue, cause by empty attributes
This commit is contained in:
parent
9e44dc8160
commit
581c60f41a
@ -56,10 +56,14 @@ export default {
|
||||
},
|
||||
filterTiles(allTiles) {
|
||||
return allTiles.filter((tile) => {
|
||||
const {
|
||||
title, description, provider, url,
|
||||
} = tile;
|
||||
const searchTerm = this.searchTile.toLowerCase();
|
||||
return tile.title.toLowerCase().includes(searchTerm)
|
||||
|| tile.provider.toLowerCase().includes(searchTerm)
|
||||
|| this.getDomainFromUrl(tile.url).includes(searchTerm);
|
||||
return (title && title.toLowerCase().includes(searchTerm))
|
||||
|| (provider && provider.toLowerCase().includes(searchTerm))
|
||||
|| (description && description.toLowerCase().includes(searchTerm))
|
||||
|| this.getDomainFromUrl(url).includes(searchTerm);
|
||||
});
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user