From 1e13a9a7baad0f60be8c7be01c1f88837a553598 Mon Sep 17 00:00:00 2001 From: jetpack <1958637641@qq.com> Date: Tue, 2 Jun 2026 14:31:33 +0800 Subject: [PATCH] Fix LVGL widget copy serialization --- packages/project-editor/flow/component.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/project-editor/flow/component.tsx b/packages/project-editor/flow/component.tsx index e2d7962ae..621948a17 100644 --- a/packages/project-editor/flow/component.tsx +++ b/packages/project-editor/flow/component.tsx @@ -2956,7 +2956,11 @@ export class Widget extends Component { return widgetEvents; } - if (jsObject.action) { + const hasLegacyAction = Object.prototype.hasOwnProperty.call( + jsObject, + "action" + ); + if (hasLegacyAction && jsObject.action) { const widgetEvents = getWidgetEvents(); if (widgetEvents) { for (const eventName of Object.keys(widgetEvents)) {