diff --git a/apps/ai-game-creator-shell/src/view/ui-editor/components/Inspector/Components/ComponentPanel.tsx b/apps/ai-game-creator-shell/src/view/ui-editor/components/Inspector/Components/ComponentPanel.tsx index 8ce36ca7b..eee3d1d51 100644 --- a/apps/ai-game-creator-shell/src/view/ui-editor/components/Inspector/Components/ComponentPanel.tsx +++ b/apps/ai-game-creator-shell/src/view/ui-editor/components/Inspector/Components/ComponentPanel.tsx @@ -57,12 +57,15 @@ export function ComponentPanel(props: ComponentPanelProps) { if (result?.ok) { setExpanded(true); setReplaceConfirmationOpen(false); + } else if (result === undefined) { + setReplaceConfirmationOpen(false); } } function removeComponent() { const result = setComponent(null); if (result?.ok) setRemoveConfirmationOpen(false); + else if (result === undefined) setRemoveConfirmationOpen(false); } return (