Open
Description
protobuf.js version: 7.3.2 and newer.
Steps to reproduce:
- Find a
Type
object in the tree:const myType = ns.lookupType('.MyType')
- Change its name:
myType.name = "NewName"
- Remove the type from the parent:
myType.parent.remove(myType)
Expected:
- The type is removed from the parent, and no longer in the
nestedArray
property
Actual:
- The type is still a child of the parent
I've added a test in a fork: runeh@a04e6ea
I assume it's due to this line:
Line 261 in 59569c1
The remove
code assumes that the name will not have changed between the node being added and removed.
Metadata
Metadata
Assignees
Labels
No labels