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: (lingui/core) i18n error if id is undefined #1938

Merged
merged 4 commits into from
May 23, 2024

Conversation

abdul-kissflow
Copy link
Contributor

Description

Lingui Core - i18n._(id) throws error if id param passed as undefined

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Examples update

Fixes #1926

  • Added id check before checking its object values

Checklist

  • I have read the CONTRIBUTING and CODE_OF_CONDUCT docs
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)

Copy link

vercel bot commented May 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
js-lingui ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 23, 2024 9:31am

Copy link

github-actions bot commented May 20, 2024

size-limit report 📦

Path Size
./packages/core/dist/index.mjs 2.87 KB (0%)
./packages/detect-locale/dist/index.mjs 723 B (0%)
./packages/react/dist/index.mjs 1.67 KB (0%)
./packages/remote-loader/dist/index.mjs 7.26 KB (0%)

@timofei-iatsenko
Copy link
Collaborator

Thanks for contribution. Could you add a test, otherwise it might be broken again in the future.

@abdul-kissflow
Copy link
Contributor Author

Thanks for contribution. Could you add a test, otherwise it might be broken again in the future.

Added test case for this case @thekip.

Screenshot 2024-05-21 at 3 10 51 PM

@timofei-iatsenko
Copy link
Collaborator

you have issues in the pipeline

@abdul-kissflow
Copy link
Contributor Author

you have issues in the pipeline

Fixed it @thekip

Copy link

codecov bot commented May 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.07%. Comparing base (d6b9698) to head (71f9ca1).
Report is 25 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1938      +/-   ##
==========================================
- Coverage   76.65%   76.07%   -0.58%     
==========================================
  Files          81       85       +4     
  Lines        2090     2115      +25     
  Branches      533      543      +10     
==========================================
+ Hits         1602     1609       +7     
- Misses        375      393      +18     
  Partials      113      113              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andrii-bodnar andrii-bodnar merged commit 36c637a into lingui:main May 23, 2024
16 checks passed
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.

i18n._(id) throws error if id param passed as undefined
3 participants