I have a collection of objects that is accessed through a getter. I am using this getter inside an action to filter the items, but no matter what I do, the filtering does not seem to work and it ends up returning all the mapped item IDs.
filterItems({ getters, commit }) {
let filteredItems = getters.getAllItems
.filter(item => item.type !== 'hat' || item.type !== 'glasses')
.map(item => item.id)
console.log(filteredItems)
commit('setFilteredItems', filteredItems)
},
What could be causing this issue?