Skip to content

Conversation

@logicalDust
Copy link
Contributor

Rare bug could happen when removing and linking element back to tree in index method. Index method was returning cached value instead of recomputing the index if the element had previously same cachedIndexVersion as new parent had childrenVersion. In this fix we are purging cachedIndexVersion in remove method as removed elements dont belong to any children collection anyway.

Rare bug could happen when removing and linking element back to tree in index method. Index method was returning cached value instead of recomputing the index if the element had previously same cachedIndexVersion as new parent had childrenVersion. In this fix we are purging cachedIndexVersion in remove method as removed elements dont belong to any children collection anyway.
@coveralls
Copy link

coveralls commented Jun 11, 2019

Coverage Status

Coverage remained the same at 100.0% when pulling 22769f9 on logicalDust:master into bdaf345 on jsdom:master.

@Joris-van-der-Wel
Copy link
Member

Thanks a lot for finding this. Could you perhaps add a unit test that fails if the the bug is present,
so that it can never happen again?

@logicalDust
Copy link
Contributor Author

Unit test added.

@Joris-van-der-Wel
Copy link
Member

Thank you :)
Published as version 3.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants