-
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
Conversation
…lication installation.
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
|
||
| if ( | ||
| to.meta.activeMenu && | ||
| to.meta.activeMenu != from.meta.activeMenu && |
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 most notable difference between the two codes is the use of localStorage.removeItem() followed by return next(); at line 47. This may cause unnecessary memory usage and should be replaced with a cleaner approach like calling an async function which will not affect cache behavior. Additionally, please ensure you follow modern naming conventions and avoid global variables or functions where reusable code has been implemented.
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.
| opts = append(opts, repo.WithByType(req.TaskType), taskRepo.WithOperate(req.TaskOperate), taskRepo.WithResourceID(req.ResourceID)) | ||
| } | ||
| taskModel, err := taskRepo.GetFirst(opts...) | ||
| if err != nil { |
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:
- Make all variables in single lines.
- Use string slicing to join strings instead of concatenation.
- Rename functions or variable names to be more descriptive.
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.
|
wanghe-fit2cloud
left a comment
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.
/lgtm
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wanghe-fit2cloud The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |



No description provided.