@cocreate/render 1.41.4 → 1.41.5
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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/index.js +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.41.5](https://github.com/CoCreate-app/CoCreate-render/compare/v1.41.4...v1.41.5) (2024-08-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* handling of array index ([3a7cae6](https://github.com/CoCreate-app/CoCreate-render/commit/3a7cae6270af70497356cd88e0287ae4d1740d0f))
|
|
7
|
+
|
|
1
8
|
## [1.41.4](https://github.com/CoCreate-app/CoCreate-render/compare/v1.41.3...v1.41.4) (2024-06-23)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -615,8 +615,9 @@ async function renderValue(node, data, placeholder, renderAs, renderedNode, inde
|
|
|
615
615
|
let value;
|
|
616
616
|
try {
|
|
617
617
|
|
|
618
|
-
if (match[1] === 'index' && index >= 0) { // {
|
|
618
|
+
if (match[1] === 'index' && index >= 0) { // {{index}} - index
|
|
619
619
|
value = index
|
|
620
|
+
match[0] = '{{' + match[1] + '}}'
|
|
620
621
|
} else if (match[1].startsWith('[') && match[1].endsWith(']')) { // {[]} - Dot-notation
|
|
621
622
|
match[1] = match[1].slice(1, -1);
|
|
622
623
|
value = getRenderValue(node, data, match[1], renderAs);
|