Skip to content

Commit

Permalink
Remove second invalidate on meta node remove
Browse files Browse the repository at this point in the history
  • Loading branch information
altavir committed Dec 31, 2023
1 parent 25281d0 commit 6ba189f
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,6 @@ private class MutableMetaImpl(
//remove child and invalidate if argument is null
if (node == null) {
children.remove(token)?.removeListener(this)
// old item is not null otherwise we can't be here
invalidate(name)
} else {
val newNode = wrapItem(node)
newNode.adoptBy(this, token)
Expand All @@ -335,7 +333,7 @@ private class MutableMetaImpl(

else -> {
val token = name.firstOrNull()!!
//get existing or create new node.
//get an existing node or create a new node.
if (items[token] == null) {
val newNode = MutableMetaImpl(null)
newNode.adoptBy(this, token)
Expand Down

0 comments on commit 6ba189f

Please sign in to comment.