Closed jwmann closed 6 years ago
Merging #104 into master will not change coverage. The diff coverage is
100%
.
@@ Coverage Diff @@
## master #104 +/- ##
======================================
Coverage 39.5% 39.5%
======================================
Files 6 6
Lines 200 200
======================================
Hits 79 79
Misses 121 121
Impacted Files | Coverage Δ | |
---|---|---|
src/utils.js | 36% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update b3f6824...a0a60f5. Read the comment docs.
In the example/demos shown in the repo, they use
id
's of0
(which I suppose could be valid) Anyway, I found a discrepancy where the menu wouldn't open if it had less than 2 items. I found this strange and found that the util functiongetChildrenLength()
had a reduce function that would count based on the 'value' of the child, in this case, this would be theid
. Since theid
was actually0
it would count as afalse
and skip the count.I've added a check specifically for
0
and it works as it should.I've also added some tests for future use-cases.