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

In v1.3.0, ReturnType of getCurrentLocale() must be Promise #428

Closed
you0518 opened this issue Oct 29, 2024 · 2 comments
Closed

In v1.3.0, ReturnType of getCurrentLocale() must be Promise #428

you0518 opened this issue Oct 29, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@you0518
Copy link

you0518 commented Oct 29, 2024

Describe the bug

getLocaleCache now returns Promise, so the ReturnType of getCurrentLocale must be Promise

return getLocaleCache() as Promise<LocalesKeys>;

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
getCurrentLocale returns Promise.

Screenshots
If applicable, add screenshots to help explain your problem.

About (please complete the following information):

  • next-international version [e.g. 0.9.5]
  • Next.js version [e.g. 13.4.0]

Additional context
Add any other context about the problem here.

@you0518 you0518 added the bug Something isn't working label Oct 29, 2024
@aurorascharff
Copy link

+1 experiencing this bug in v1.3.0. Fixed it for my app by awaiting getCurrentLocale (even though typescript says its not a promise).

@QuiiBz
Copy link
Owner

QuiiBz commented Oct 31, 2024

Fixed in #431, released in version 1.3.1.

@QuiiBz QuiiBz closed this as completed Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants