title: Vuex is only removing the first element
body: <p>I have the following setup, trying to remove the <code>activeNote</code> from the <code>notes</code> array using <code>DELETE_NOTE</code> mutation. But it only removes the first element of the array.</p>
  
  <p>the mutations.js is:</p>
  
  <pre><code>export const mutations = {
    DELETE_NOTE (state) {
      console.log(state.activeNote) // here the activeNote is the correctly selected note
      if (typeof state.notes !== 'undefined' &amp;&amp; state.notes.length &gt; 0) {
        state.notes.splice(state.activeNote, 1) // here no matter what the first element is removed
        if (state.notes.length === 0) {
          state.activeNote.text = ''
          state.activeNote.favorite = false
        } else {
          state.activeNote = state.notes[state.notes.length - 1]
        }
      }
    },
    SET_ACTIVE_NOTE (state, note) {
      state.activeNote = note
    }
  }
  </code></pre>
  
  <p>the actions.js is:</p>
  
  <pre><code>export const actions = {
    deleteNote: ({ commit }) =&gt; commit('DELETE_NOTE'),
    updateActiveNote: ({ commit }, note) =&gt; commit('SET_ACTIVE_NOTE', note),
  }
  </code></pre>
  
  <p>the getters are:</p>
  
  <pre><code>const getters = {
    activeNote: state =&gt; state.activeNote,
    notes: state =&gt; state.notes,
  }
  </code></pre>
  
  <p>the component I call the mutation from is:</p>
  
  <pre><code>&lt;template&gt;
    &lt;div id="toolbar"&gt;
      &lt;i @click="deleteNote" class="glyphicon glyphicon-remove"&gt;&lt;/i&gt;
    &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  import { mapGetters, mapActions } from 'vuex'
  
  export default {
    name: 'toolbar',
    computed: mapGetters([
      'activeNote'
    ]),
    methods: mapActions([
      'deleteNote',
    ])
  }
  &lt;/script&gt;
  </code></pre>