arqex / freezer

A tree data structure that emits events on updates, even if the modification is triggered by one of the leaves, making it easier to think in a reactive way.
MIT License
1.28k stars 56 forks source link

Fix fixChildren issue that leave parents of deeper child unchanged #93

Closed hunteva closed 7 years ago

hunteva commented 7 years ago

Symptom

image

Cause

fixChildren leave the parents of deeper child unchanged in some cases.

Changed

Update parents of all children during reset.

arqex commented 7 years ago

Hey @hunteva

That's a nice catch! You need have a high understanding of how freezer works to create a PR like this, I love it :)

I'll try to review it this evening and merge it, thanks in advance!

hunteva commented 7 years ago

Thanks @arqex , I just come across with this by chance, it did take me some time to figure out. it is a good library though.