mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
7aaf440fbf
# Objective The Bevy API around manipulating hierarchies removes `Children` if the operation results in an entity having no children. This means that `Children` is guaranteed to hold actual children. However, the following code unexpectedly inserts empty `Children`: ```rust commands.entity(entity).with_children(|_| {}); ``` This was discovered by @Jondolf: https://discord.com/channels/691052431525675048/1124043933886976171/1257660865625325800 ## Solution - `with_children` is now a noop when no children were passed ## Testing - Added a regression test |
||
---|---|---|
.. | ||
components | ||
child_builder.rs | ||
events.rs | ||
hierarchy.rs | ||
lib.rs | ||
query_extension.rs | ||
valid_parent_check_plugin.rs |