Closed AndrewWalsh closed 10 months ago
Thanks for the PR! Is there a chance you can add a fixture to the tests that were previously failing? ππΌ
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
fe00560
) 95.63% compared to head (4a744e0
) 95.63%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks for taking a look @pi0. I've written a test to cover this. Changing node.children.size === 0
to Object.keys(node.children).length === 0
will make this fail.
@AndrewWalsh Since main branch is already prepared for 2.x release, this patch will be included in 2.x once released but please let me know if it is something blocking for you i can make a hotfix branch to cherry-pick it.
All good, I don't need the fix from my end, thanks for the consideration.
fix: use Map
size
property to calculate the number of children. The current approach does not count them correctlyhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/size
π Linked issue
β Type of change
π Description
remove
will remove nodes that have no data, but do have childrensize
property to count children correctly and align with the original intended behaviourπ Checklist