Skip to content

Commit

Permalink
.state ref should only be nulled if component is being disposed
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Dec 19, 2023
1 parent b8ef3b5 commit 8209c4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion haxe/ui/backend/ScreenImpl.hx
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ class ScreenImpl extends ScreenBase {
throw "component wasnt actually removed from array, or there is a duplicate in the array";
}
if (dispose) {
component.state = null;
component.destroyInternal();
component.destroy();
component.destroyComponent();
Expand All @@ -222,7 +223,6 @@ class ScreenImpl extends ScreenBase {
if (StateHelper.currentState.exists == true) {
StateHelper.currentState.remove(component, true);
}
component.state = null;
checkResetCursor();
onContainerResize();
return component;
Expand Down

0 comments on commit 8209c4d

Please sign in to comment.