title: TypeError: Cannot read properties of null (reading 'find')"
body: <p>I'm trying to push an object to an array using vuex but i'm getting this error. I don't know why in Edge works great, but in Chrome and Opera it doesn't.</p>
  <p><em>TypeError: Cannot read properties of null (reading 'find')&quot;</em></p>
  <p>Vuex store:</p>
  <pre><code>export default {
    namespaced: true,
    state: {
      shoppingCartItems: [], 
    },
    mutations: {
      SET_ITEM(state, payload) {
        if (state.shoppingCartItems.find(item =&gt; item.type === 'custom-item')) {
          state.shoppingCartItems.push(payload)
        } else if (state.shoppingCartItems.find(item =&gt; item.name === payload.name)) {
          const index = state.shoppingCartItems.findIndex(item =&gt; item.name === payload.name)
          const value = payload.quantity
          state.shoppingCartItems[index].quantity += value
        } else {
          state.shoppingCartItems.push(payload)
        }
      },
    }
  }
  </code></pre>
  <p>In SET_ITEM I'm checking if the payload is an item that already is in the array so instead of adding again, it sums 1 to this specific item. And again, in Edge it's working perfectly, but in Chrome everything seems to be broken.</p>
  <p>Example of payload that SET_ITEM is receiving:</p>
  <pre><code>payload = {
  dimensions: &quot;30x10cm&quot;
  extraLine: 2
  extraQuote: &quot;no&quot;
  frases: [__ob__: Observer]
  image: &quot;&quot;
  name: &quot;custom-item&quot;
  namesQuantity: 1
  names: [{…}, __ob__: Observer]
  price: 180
  quantity: 1
  type: &quot;custom-item&quot;
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/OLQ3Z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OLQ3Z.png" alt="enter image description here" /></a></p>