[Vuejs]-Filter is not working inside the action for filtering array of objects in Vuex

0👍

I think the problem is coming from here:

item.type !== 'hat' || item.type !== 'glases'
  1. This always returns true because item.type will never be equivalent to 'hat' and 'glases' at the same time.
  2. I doubt that 'glases' is a correct spelling? This might be a problem or just a mis-typing

Leave a comment