From 0ab68a71bf80202b96751ae6b69131e409f69e81 Mon Sep 17 00:00:00 2001 From: Martin Vladic Date: Wed, 16 Oct 2024 15:29:31 +0200 Subject: [PATCH] fixed #593 Pages not visible with User Widget --- packages/project-editor/lvgl/widgets/Base.tsx | 2 +- packages/project-editor/lvgl/widgets/UserWidget.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/project-editor/lvgl/widgets/Base.tsx b/packages/project-editor/lvgl/widgets/Base.tsx index cee47412..545bf839 100644 --- a/packages/project-editor/lvgl/widgets/Base.tsx +++ b/packages/project-editor/lvgl/widgets/Base.tsx @@ -1575,7 +1575,7 @@ export class LVGLWidget extends Widget { const project = ProjectEditor.getProject(this); - if (runtime.wasm.assetsMap) { + if (runtime.wasm.assetsMap?.flowIndexes.length > 0) { const page = getAncestorOfType( this, ProjectEditor.PageClass.classInfo diff --git a/packages/project-editor/lvgl/widgets/UserWidget.tsx b/packages/project-editor/lvgl/widgets/UserWidget.tsx index 83cb0c1d..c25d9389 100644 --- a/packages/project-editor/lvgl/widgets/UserWidget.tsx +++ b/packages/project-editor/lvgl/widgets/UserWidget.tsx @@ -456,7 +456,7 @@ export class LVGLUserWidgetWidget extends LVGLWidget { const savedUserWidgetContext = runtime.lvglCreateContext; - if (runtime.wasm.assetsMap) { + if (runtime.wasm.assetsMap?.flowIndexes.length > 0) { const flow = runtime.wasm.assetsMap.flows[savedUserWidgetContext.pageIndex]; if (flow) {