drupal-canvas 0.4.3 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -479,7 +479,10 @@ function normalizeCanvasProps(value) {
|
|
|
479
479
|
function renderSpecElement(key, elements, registry, ctx) {
|
|
480
480
|
const element = elements[key];
|
|
481
481
|
if (!element) throw new Error(`Element key "${key}" not found in elements map.`);
|
|
482
|
-
if (element.type === "canvas:component-tree")
|
|
482
|
+
if (element.type === "canvas:component-tree") {
|
|
483
|
+
const children = (element.children ?? []).map((childKey) => renderSpecChild(childKey, elements, registry, ctx));
|
|
484
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
485
|
+
}
|
|
483
486
|
const component = registry[element.type];
|
|
484
487
|
if (!component) return null;
|
|
485
488
|
const normalizedProps = normalizeCanvasProps(resolveElementProps(element.props, ctx));
|
package/package.json
CHANGED