Static GitHub Issues

[1367] bug - this.$router.push doesn't work for the first click where hash is present

prev: js code added to head.script with innerhtml is always encoded
next: Nuxt is not a constructor

Reproduction

  1. Click on the link on the page with the hash, eg.: <nuxt-link :to="`${postLink(post)}#add-comment-form`"> Page is changing correctly.

  2. After that click on the second link, eg.: <a @click="changeCategory(c)">category</a> where changeCategory:
    methods: {
      changeCategory (cat) {
        const url = categoryLink(cat)
        console.log('moving to ', url)
        this.$router.push({ path: url })
      }
    },

The method is called, the progress bar is animating but the page doesn't change.

  1. To change to page I need to click once again on the same link. The bug is only present when the first link has a # hash at the end. Tested with alfa-4 and rc-4

thanks for help in advance,

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This bug report is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1211">#c1211</a>)</em></sub></div>