@cocreate/render 1.28.6 → 1.28.7
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 +8 -0
- package/package.json +1 -1
- package/src/index.js +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [1.28.7](https://github.com/CoCreate-app/CoCreate-render/compare/v1.28.6...v1.28.7) (2023-10-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* clears render element if index = 0 and crate and update not true ([90e4946](https://github.com/CoCreate-app/CoCreate-render/commit/90e4946cf579e5030d51c2e180f61b5a03ebbc33))
|
|
7
|
+
* declartion of render functions using object spread ([b3e3977](https://github.com/CoCreate-app/CoCreate-render/commit/b3e397747e18cc6fe52c0838b465adcaafaea416))
|
|
8
|
+
|
|
1
9
|
## [1.28.6](https://github.com/CoCreate-app/CoCreate-render/compare/v1.28.5...v1.28.6) (2023-10-17)
|
|
2
10
|
|
|
3
11
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -196,7 +196,8 @@ async function renderTemplate(template, data, key, index, keyPath) {
|
|
|
196
196
|
|
|
197
197
|
if (!renderData) return
|
|
198
198
|
|
|
199
|
-
|
|
199
|
+
let isInsert = data.$filter && (data.$filter.create || data.$filter.update)
|
|
200
|
+
if (!isInsert && index === 0) {
|
|
200
201
|
for (const [key, element] of template.clones) {
|
|
201
202
|
renderedNodes.delete(element)
|
|
202
203
|
element.remove()
|
|
@@ -752,4 +753,4 @@ Observer.init({
|
|
|
752
753
|
|
|
753
754
|
init()
|
|
754
755
|
|
|
755
|
-
export
|
|
756
|
+
export { render, sources, renderedNodes }
|