Add admin scroll controls and site interaction fixes
This commit is contained in:
@@ -114,7 +114,12 @@ function renderEachBlocks(html, block) {
|
||||
throw new Error(`Each token "${path}" in block "${block.id}" must point to an array`);
|
||||
}
|
||||
|
||||
return items.map((item) => renderTemplate(innerHtml, item ?? {})).join("");
|
||||
return items
|
||||
.map((item) => {
|
||||
const itemScope = item && typeof item === "object" && !Array.isArray(item) ? item : { value: item };
|
||||
return renderTemplate(innerHtml, { ...block, ...itemScope });
|
||||
})
|
||||
.join("");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user