refactor(locale): use null as not applicable#2078
Merged
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
|
ejcheng
previously approved these changes
Apr 21, 2023
Shinigami92
previously approved these changes
Apr 21, 2023
Member
|
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 |
Member
{
location: {
city: null,
country: null,
},
}🤔 |
Member
Author
I'll write a test for that tomorrow, if I don't have one of those yet. |
Member
Currently the word |
Member
Author
|
I added the missing test. |
Shinigami92
approved these changes
Apr 22, 2023
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Created based on:
Instead of relying on magic values such as
[],{},'', ... we should usenullas explicitly absent values.