From ce309a3b28e172f8c696422b72e0817d84b9eafb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Fri, 18 Sep 2026 16:33:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=BD=E7=95=A5=E6=9C=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E7=9A=84=E8=8A=82=E7=82=B9=E5=85=83=E6=95=B0=E6=8D=AE=E8=A1=A5?= =?UTF-8?q?=E4=B8=81=20=E4=BF=9D=E7=95=99=E9=83=A8=E5=88=86=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=AF=B9=E6=9C=AA=E6=8F=90=E4=BE=9B=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=9A=84=E5=8E=9F=E6=9C=89=E8=AF=AD=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/features/ui-editor/stateTransition.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/ai-game-creator-shell/src/features/ui-editor/stateTransition.ts b/apps/ai-game-creator-shell/src/features/ui-editor/stateTransition.ts index 552e64a2b..c4338e0ca 100644 --- a/apps/ai-game-creator-shell/src/features/ui-editor/stateTransition.ts +++ b/apps/ai-game-creator-shell/src/features/ui-editor/stateTransition.ts @@ -117,6 +117,9 @@ export function applyUiEditorCommand( const status = command.patch.component_status; if (status !== 'NoProblem') return { ok: false, reason: 'invalid' }; } - node.metadata = { ...node.metadata, ...structuredClone(command.patch) }; + const patch = Object.fromEntries( + Object.entries(command.patch).filter(([, value]) => value !== undefined), + ) as Partial; + node.metadata = { ...node.metadata, ...structuredClone(patch) }; return { ok: true, state: next }; }