-
-
Notifications
You must be signed in to change notification settings - Fork 929
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
refactor(locale): use null as not applicable #2078
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## next #2078 +/- ##
=======================================
Coverage 99.59% 99.59%
=======================================
Files 2538 2538
Lines 242656 242636 -20
Branches 1298 1300 +2
=======================================
- Hits 241669 241659 -10
+ Misses 960 950 -10
Partials 27 27
|
What is the expected behavior for: const result = mergeLocale([
{
location: {
city: null,
country: null,
},
},
{
location: {
city: ['cityA'],
},
},
{
location: {
country: ['countyA'],
},
}
]);
console.log(result); // ? Is there anything we need to take care of in merging locales and |
{
location: {
city: null,
country: null,
},
} 🤔 |
I'll write a test for that tomorrow, if I don't have one of those yet. |
Currently the word |
I added the missing test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you 👍
Created based on:
Instead of relying on magic values such as
[]
,{}
,''
, ... we should usenull
as explicitly absent values.