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/bug 1691 preserving change language binding #1720

Conversation

timheilman
Copy link
Contributor

Checklist

  • only relevant code is changed (make a diff before you submit the PR)
  • run tests npm run test
  • tests are included
  • commit message and code follows the Developer's Certification of Origin

Checklist (for documentation change)

  • only relevant documentation part is changed (make a diff before you submit the PR)
  • motivation/reason is provided
  • commit message and code follows the Developer's Certification of Origin

…f fixedT function,

bad impl, breaks test that was introduced in parent commit, verifying bug here: i18next#1716 (comment)
…verywhere

other than where the bug was occurring, and keep shallow routing working via dependency list of useCallback hook.  Fixes test broken by parent commit.
@coveralls
Copy link

Coverage Status

coverage: 97.029% (+0.04%) from 96.986%
when pulling 3c3f512 on timheilman:fix/bug-1691-preserving-changeLanguage-binding
into ac3f71c on i18next:master.

@timheilman
Copy link
Contributor Author

Sorry about the initial bad fix in #1716 . A dev issue was uncovered over at #1716 (comment) . Unfortunately I still cannot figure out how to test the bug 1691 proper in a unit test, but the dev issue does have a test added that:

  1. succeeds before Fix/bug 1691 make returned t function identical upon second effect run in strict mode #1716
  2. fails after Fix/bug 1691 make returned t function identical upon second effect run in strict mode #1716 , demonstrating the dev issue
  3. succeeds after this PR

I also have tested this PR manually for both bug 1691 proper as well as for the dev issue. I welcome @adrai and @medihack 's eyes on this second attempt, as well as anyone else's interested. No time pressure.

@adrai adrai merged commit dc36d69 into i18next:master Feb 6, 2024
6 checks passed
@adrai
Copy link
Member

adrai commented Feb 6, 2024

thank you... it's included in v14.0.5

@adrai
Copy link
Member

adrai commented Feb 6, 2024

fyi: verified to work also in this example 8334298 👍

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.

None yet

3 participants