Skip to content

Commit

Permalink
fix: AlignComponent set child (remove compare) (#2774)
Browse files Browse the repository at this point in the history
At the moment, I have removed the additional check, because an object deleted outside its parent may not be checked and the reference is not reset in the onChildrenChanged method
  • Loading branch information
denisgl7 committed Oct 2, 2023
1 parent 21357bc commit 20aaf65
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions packages/flame/lib/src/layout/align_component.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ class AlignComponent extends PositionComponent {
PositionComponent? get child => _child;

set child(PositionComponent? value) {
if (_child == value) {
return;
}
if (_child?.parent == this) {
_child?.removeFromParent();
}
Expand Down

0 comments on commit 20aaf65

Please sign in to comment.