Skip to content

don't set name on start when data.name is undefined #134

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

Merged
merged 1 commit into from
Dec 10, 2022
Merged

Conversation

lihebi
Copy link
Collaborator

@lihebi lihebi commented Dec 10, 2022

setPodName caused sync on page refresh. This PR fixes it.

@lihebi lihebi merged commit e4feb41 into main Dec 10, 2022
@li-xin-yi
Copy link
Collaborator

What if a user clear the pod name (make it empty)?

@lihebi
Copy link
Collaborator Author

lihebi commented Dec 10, 2022

I think this condition only checks for undefined value but not empty string. Please see if that’s a problem, and if so let’s check data.name === pod.name as well.

@li-xin-yi
Copy link
Collaborator

I introduced a check in previous PR (https://github.com/codepod-io/codepod/blob/main/ui/src/lib/store.tsx#L458), to mark a pod dirty, we may first check if the value is actually updated.

@lihebi
Copy link
Collaborator Author

lihebi commented Dec 12, 2022

I introduced a check in previous PR, to mark a pod dirty, we may first check if the value is actually updated.

Yes, this looks good.

@lihebi lihebi deleted the fix-setname-dirty branch June 30, 2023 16:31
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.

2 participants