-
-
Notifications
You must be signed in to change notification settings - Fork 629
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
loadNamespaces() doesn't keep resolving order when the second request completes before the first one #1785
Comments
Can you create a test that reproduces your behaviour like this, please: https://github.com/i18next/i18next/blob/master/test/i18next.backend.concurrentLoad.spec.js |
adrai
added a commit
that referenced
this issue
Jun 3, 2022
…equest completes before the first one #1785
v21.8.8 should fix that |
have you tried v21.8.8 ? |
Works as expected with v21.8.8, thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🐛 Bug Report
If we make several requests with loadNamespaces() to different namespaces, in case when the second completes faster than the first one, the first promise resolves first when it's not loaded in fact yet. The bug appeared with version 21.8.0 and higher.
Case 1: The first request completes first - everything is OK
Case 2: The second request completes first - Bug
To Reproduce
Sample: https://codesandbox.io/s/optimistic-tdd-sycrtt?file=/src/app/app.component.ts
Expected behavior
loadNamespaces() resolves when the appropriate namespace loaded, for example as it worked with version 21.7.1
Your Environment
The text was updated successfully, but these errors were encountered: