title: using `$router.push` when validating a dynamic route
body: <p>I am using Nuxt and I have created a have a dynamic route which fetches data using vuex and an axios call. I want to route the user back to <code>index</code> when no id params are specified. I see that i can use <code>validate</code> on dynamic routes <a href="https://nuxtjs.org/api/pages-validateWhen" rel="nofollow noreferrer">https://nuxtjs.org/api/pages-validateWhen</a></p>
  <p>I am using the code below, when I navigate to <code>localhost:3000/settings/</code> i get the following error <code>Cannot read property 'push' of undefined</code></p>
  <p><strong>pages/settings/_id.vue</strong></p>
  <pre><code>export default {  
    validate({ params }) {
      if (params.id !== null) {
        this.$router.push({ name: 'index' })
      }
      return false
    }
  }
  </code></pre>