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

fix(ui): history error reported in the dev environment #20133

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ export const PodsLogsViewer = (props: PodLogsProps) => {
const logsContainerRef = useRef(null);

const setWithQueryParams = <T extends (val: any) => void>(key: string, cb: T) => {
history.replaceState(null, '', `${location.pathname}?${queryParams}`);

Comment on lines -94 to -95
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have any sense why this was present in the first place? Can we be confident that it's not needed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah nevermind the original author gave it the thumbs-up. @linghaoSu how far back do we need to cherry-pick this?

Copy link
Contributor

@linghaoSu linghaoSu Sep 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have checked the commit this bug introduced, this change does not ship in any RC or stable version. We don't need to cherry-pick, merging this into the master branch is enough.

40c6077

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solves it for me.

return (val => {
cb(val);
queryParams.set(key, val.toString());
Expand Down