title: Error in nextTick: "TypeError: Cannot read property 'key' of undefined" in vue
body: <p>I used same approach as <a href="https://codepen.io/mburridge/pen/WgXrvG" rel="nofollow noreferrer">here</a> to make something similar but when ever I click on buttons sometimes it happens right away sometimes after 20 clicks....</p>
  
  <p>Here is my code: (Inside .vue file)</p>
  
  <pre><code>&lt;template&gt;
  &lt;div class="right-bar" :class="{'hide':!open}"&gt;
      &lt;div class="header-bar"&gt;
          &lt;button @click="changeTab(1)" class="hbm" :class="[ activetab === 1 ? 'active' : '' ]"&gt;
              &lt;i class="fas fa-tachometer-alt"&gt;&lt;/i&gt;
          &lt;/button&gt;
          &lt;button @click="changeTab(2)" class="hbm" :class="[ activetab === 2 ? 'active' : '' ]"&gt;
              &lt;i class="fas fa-comments"&gt;&lt;/i&gt;
          &lt;/button&gt;
          &lt;button @click="changeTab(3)" class="hbm" :class="[ activetab === 3 ? 'active' : '' ]"&gt;
              &lt;i class="fas fa-bell"&gt;&lt;/i&gt;
          &lt;/button&gt;
          &lt;button @click="changeTab(4)" class="hbm" :class="[ activetab === 4 ? 'active' : '' ]"&gt;
              &lt;i class="fas fa-cog"&gt;&lt;/i&gt;
          &lt;/button&gt;
          &lt;i class="fas rs-btn" :class="[open?'fa-chevron-down':'fa-chevron-up']" @click.prevent="open=!open"&gt;&lt;/i&gt;
      &lt;/div&gt;
      &lt;div class="content-form"&gt;
          &lt;div class="form" v-if="activetab === 1"&gt;
              &lt;slot name="overview"&gt;&lt;/slot&gt;
          &lt;/div&gt;
          &lt;div class="form" v-if="activetab === 2"&gt;
              &lt;slot name="messages"&gt;&lt;/slot&gt;
          &lt;/div&gt;
          &lt;div class="form" v-if="activetab === 3"&gt;
              &lt;slot name="notifications"&gt;&lt;/slot&gt;
          &lt;/div&gt;
          &lt;div class="form" v-if="activetab === 4"&gt;
              &lt;slot name="settings"&gt;&lt;/slot&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
      export default {
          data() {
              return {
                  open: true,
                  activetab: 1
              }
          },
          methods: {
              changeTab(i) {
                  this.activetab = i;
              }
          }
      };
  &lt;/script&gt;
  </code></pre>
  
  <p>Here is a quick video of it: (because as I said some times it happens in few some times in lot clicks)</p>
  
  <p><a href="https://streamable.com/zpk4m" rel="nofollow noreferrer">https://streamable.com/zpk4m</a></p>
  
  <p>Both versions are 2.5.17 but I use one with laravel fresh installation..
  Also I have installed vuex and lodash... if it means something</p>