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

Ensure fetch is not called when navigating backwards #11986

Merged
merged 5 commits into from
Sep 25, 2024

Conversation

jordojordo
Copy link
Member

@jordojordo jordojordo commented Sep 20, 2024

Summary

Fixes #11931

The issue was caused due to a watch on the $route.query object, when that changed we would call $fetch a second time before leaving the page.

Occurred changes and/or fixed issues

Added a condition to check for an empty query object before calling $fetch

Technical notes summary

When navigating backwards (from apps/charts/chart to apps/charts) the query object is empty, the watch is still used when the route contains the query, e.g. when selecting a different version from the Readme view.

Areas or cases that should be tested

  • Navigate to apps/charts
  • Select a chart
  • Ensure the version select still works
  • Navigate back to the charts page
  • Ensure no errors are logged in the console

Areas which could experience regressions

Screenshot/Video

2024-09-20.13-52-58.mp4

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes

@jordojordo jordojordo merged commit 31519da into rancher:master Sep 25, 2024
37 checks passed
@jordojordo jordojordo deleted the chart-detail branch September 25, 2024 15:11
yonasberhe23 pushed a commit to yonasberhe23/dashboard that referenced this pull request Sep 25, 2024
* Ensure fetch is not called when navigating backwards
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception thrown when leaving Chart detail page
2 participants