-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix: Fixed the issue with incorrect routing for quick jump during app… #7916
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,9 +39,12 @@ router.beforeEach((to, from, next) => { | |
| return; | ||
| } | ||
|
|
||
| if (to.path === '/apps/all' && to.query.install != undefined) { | ||
| return next(); | ||
| } | ||
|
|
||
| const activeMenuKey = 'cachedRoute' + (to.meta.activeMenu || ''); | ||
| const cachedRoute = localStorage.getItem(activeMenuKey); | ||
|
|
||
| if ( | ||
| to.meta.activeMenu && | ||
| to.meta.activeMenu != from.meta.activeMenu && | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The most notable difference between the two codes is the use of For example: try {
// Remove cached route from local storage if it exists
} catch (error) {}
return await router.push(to); // Always push to location rather than navigatingThis version uses try-catch block to prevent errors during removal. The return await statement ensures that no side effects take place in case an error arises while trying to remove the item form cache. |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The two code files have different names, but the overall structure is almost identical as they serve the same purpose of reading log data from a File service based on a given file read line request. However, there's no direct difference identified that suggests an issue or regularity problem.
To optimize the readability and performance:
For checking the compliance with standards over time, this should not impact anything since they're written well and do what they should: fetching the log data from the provided repository.