Skip to content

fix(vue): canGoBack now returns correct result with initial load redirect - #22071

Merged
liamdebeasi merged 1 commit into
ionic-vuefrom
init-path
Sep 11, 2020
Merged

fix(vue): canGoBack now returns correct result with initial load redirect#22071
liamdebeasi merged 1 commit into
ionic-vuefrom
init-path

Conversation

@liamdebeasi

Copy link
Copy Markdown
Contributor

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Previously, we set an initial location history view item no matter the path. This was to work around some undefined errors when on the initial page (if there was no previous page). This was wrong as it set a location history item even for an initial page redirect. This results in canGoBack being wrong as there were always 2+ items in the history stack.

What is the new behavior?

  • No longer set initial route, let that happen naturally by listening to the data vue router gives us.

Does this introduce a breaking change?

  • Yes
  • No

Other information

@liamdebeasi
liamdebeasi merged commit 8227844 into ionic-vue Sep 11, 2020
@liamdebeasi
liamdebeasi deleted the init-path branch September 11, 2020 15:33
TakumaKira pushed a commit to TakumaKira/ionic-framework that referenced this pull request Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant