Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nuxt@2.15.4 $router.back not work as expected #9192

Closed
Jogiter opened this issue Apr 25, 2021 · 3 comments
Closed

nuxt@2.15.4 $router.back not work as expected #9192

Jogiter opened this issue Apr 25, 2021 · 3 comments

Comments

@Jogiter
Copy link

Jogiter commented Apr 25, 2021

Versions

  • nuxt: V2.15.4
  • node: v14.15.1

Reproduction

https://codesandbox.io/s/nuxt2154-routerback-error-7s1p8

online demo

module.export.default = {
 // Disable server-side rendering: https://go.nuxtjs.dev/ssr-mode
  ssr: false,

  // Target: https://go.nuxtjs.dev/config-target
  target: "static",

  router: {
    mode: "hash"
  },

 // default ...
}

Steps to reproduce

  1. navigate from home to about
  2. refresh about 3 times
  3. click a button to call $router.back(), the page is still about
  4. after i clicked the back button 4 times, it navigate to home

What is Expected?

after the back-button once, it`ll back to home

@Jogiter
Copy link
Author

Jogiter commented Apr 25, 2021

the same config with nuxt@2.15.3 Reproduction

demo

$router.back() work as expected.

@kozo002
Copy link

kozo002 commented Apr 26, 2021

The same bug happens in https://nuxtjs.org/

Copy link
Member

Closing in favour of #9111.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants