@unoverse-platform/studio 0.1.82 → 0.1.84
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.
package/package.json
CHANGED
|
@@ -183,7 +183,11 @@ export function renderNode(
|
|
|
183
183
|
// in the def (props exist only for state — UNOVERSE_AUTHORING.md). bind wins.
|
|
184
184
|
const src = node.bind?.items ? data[node.bind.items] : node.items;
|
|
185
185
|
const items = Array.isArray(src) ? src : [];
|
|
186
|
-
|
|
186
|
+
// `template` is read by two node types and the shape says which: a SUBTREE here on Each,
|
|
187
|
+
// a holder NAME (string) on Template, which this branch never sees. Narrow rather than
|
|
188
|
+
// assert, so a definition that puts the wrong one here renders nothing instead of
|
|
189
|
+
// throwing inside the map.
|
|
190
|
+
const tpl = typeof node.template === "object" ? node.template : undefined;
|
|
187
191
|
// WHERE AN ITEM SITS is something only the renderer knows, and a numbered list cannot
|
|
188
192
|
// be authored without it: the data carries no ordinal, and a template cannot count.
|
|
189
193
|
// `index` is 0-based for logic, `position` 1-based because that is what a reader sees.
|