diff --git a/public/editor/bridge-core.js b/public/editor/bridge-core.js index e8000b6..24a63e2 100644 --- a/public/editor/bridge-core.js +++ b/public/editor/bridge-core.js @@ -1233,6 +1233,12 @@ ed.loadProjectData(parsedState); applied = true; log('CONTENT', 'JSON-Projektzustand angewendet.', 'orange'); + const hasComponents = ed.getComponents && ed.getComponents().length > 0; + const hasHtml = (ed.getHtml && ed.getHtml().trim()) ? true : false; + if (!hasComponents && !hasHtml && html) { + log('CONTENT WARN', 'JSON geladen aber leer, wechsle auf HTML-Fallback.', 'orange', 'warn'); + applied = false; + } } catch (e) { log('CONTENT ERROR', `JSON loadProjectData Fehler: ${e.message}`, 'red', 'error'); if (!html) {