5 710
edições
Sem resumo de edição |
Sem resumo de edição |
||
Linha 759: | Linha 759: | ||
if (itemsToFilter.length > 0) { | if (itemsToFilter.length > 0) { | ||
const filteredItems = itemsToFilter.filter(item => { | const filteredItems = itemsToFilter.filter(item => { | ||
const matchesTag = selectedTags.length | const matchesTag = selectedTags.length === 0 || selectedTags.some(tag => item.tags.includes(tag)); | ||
const matchesId = filterById === '' || filterById.split(',').map(id => id.trim()).includes(item.id); | const matchesId = filterById === '' || filterById.split(',').map(id => id.trim()).includes(item.id); | ||
const matchesLocal = selectedOption === '' || item.tags.includes(selectedOption); | const matchesLocal = selectedOption === '' || item.tags.includes(selectedOption); |