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

Don't report changes for empty text #1046

Closed
wants to merge 1 commit into from

Conversation

nbradbury
Copy link
Contributor

@nbradbury nbradbury commented Apr 14, 2023

Fixes #1045

Currently hasChanges returns CHANGES when it is first opened, before any changes have been made. This happens because the comparison relies on initialEditorContentParsedSHA256, which is initialized as an empty array - which doesn't match the hash of an empty string.

The PR resolves that problem.

  • If there are new strings that have to be translated, I have added them to the client's strings.xml as a part of the integration PR.

@nbradbury nbradbury added the bug label Apr 14, 2023
@nbradbury nbradbury marked this pull request as ready for review April 14, 2023 16:43
@nbradbury
Copy link
Contributor Author

We decided to close this because although the fix is good for Day One, we're not 100% sure it's the behavior WordPress wants.

@nbradbury nbradbury closed this Apr 18, 2023
@nbradbury nbradbury deleted the issue/1045-has-changes-empty-text branch April 19, 2023 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Editor reports it has changes for empty text
1 participant