title: Sorting array from vuex store (infinite render warning)
body: <p>I'm retrieving an array of objects from the vuex store and I am trying to sort that array in one of my components (I don't want to sort the array in the store). But I get an error <code>infinite update loop in a component render function</code> in my browser. What is happening here and how can I fix this?</p>
  
  <pre><code>&lt;template&gt;
    &lt;div
      v-for="(item, i) in itemList"&gt;
      {{item.description}}
    &lt;/div&gt;
  &lt;/template&gt;
  
  
  computed: Object.assign({},
    mapGetters({
      currentItemList: "item/current",
    }),
    {
     itemList() {
       if(this.currentItemList != undefined) {
         return this.currentItemList.sort(function(a, b) {
             var textA = a.description.toUpperCase()
             var textB = b.description.toUpperCase()
             return (textA &lt; textB) ? -1 : (textA &gt; textB) ? 1 : 0
           })
        }
        else {
          return []
        }
      },
    }
  )
  </code></pre>