diff --git a/crates/bevy_ui/src/layout/mod.rs b/crates/bevy_ui/src/layout/mod.rs index 40cdc0ccaa64b..80cd0c9f86092 100644 --- a/crates/bevy_ui/src/layout/mod.rs +++ b/crates/bevy_ui/src/layout/mod.rs @@ -275,7 +275,7 @@ pub fn ui_layout_system( } // When a `ContentSize` component is removed from an entity, we need to remove the measure from the corresponding taffy node. - for entity in removed_content_sizes.iter() { + for entity in removed_content_sizes.read() { ui_surface.try_remove_measure(entity); }