diff --git a/src/rootPages/Designer/ui_work_interface_workspace_editor_layout.js b/src/rootPages/Designer/ui_work_interface_workspace_editor_layout.js index e8337a5..50ba9fa 100644 --- a/src/rootPages/Designer/ui_work_interface_workspace_editor_layout.js +++ b/src/rootPages/Designer/ui_work_interface_workspace_editor_layout.js @@ -261,7 +261,17 @@ export default function (AB) { editorUI.id = `${ids.editArea}_dashboard_layout`; // clear out widgets in our dashboard area - const subWidgets = editorUI.rows ?? editorUI.cols; + var subWidgets = editorUI.rows ?? editorUI.cols; + if (!subWidgets || subWidgets.length === 0) { + if (editorUI.body) { + subWidgets = editorUI.body.rows ?? editorUI.body.cols; + } + if (!subWidgets || subWidgets.length === 0) { + console.error("Tell Johnny: No sub widgets found in editor UI"); + console.error(editorUI); + return; + } + } const idDashboard = subWidgets[0].id; const $dashboard = $$(idDashboard); if ($dashboard) $dashboard.clearAll();