j-templates 7.0.12 → 7.0.13

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.
Files changed (2) hide show
  1. package/Node/vNode.js +4 -3
  2. package/package.json +1 -1
package/Node/vNode.js CHANGED
@@ -129,6 +129,7 @@ function InitNode(vnode) {
129
129
  }
130
130
  else if (childrenArray) {
131
131
  vnode.children = childrenArray;
132
+ vNode.InitAll(vnode.children);
132
133
  }
133
134
  else if (children) {
134
135
  if (data) {
@@ -137,7 +138,7 @@ function InitNode(vnode) {
137
138
  else
138
139
  StaticChildren(vnode, children);
139
140
  }
140
- UpdateChildren(vnode, true);
141
+ UpdateChildren(vnode, true, !!childrenArray);
141
142
  }
142
143
  function StaticChildren(vnode, children) {
143
144
  const childrenScope = Store_1.ObservableScope.Create(WrapStaticChildren(vnode.injector, children));
@@ -256,14 +257,14 @@ function WrapDynamicChildren(dataScope, nodeList, injector, children) {
256
257
  return nextNodeArray;
257
258
  };
258
259
  }
259
- function UpdateChildren(vnode, init = false) {
260
+ function UpdateChildren(vnode, init = false, skipInit = false) {
260
261
  if (!vnode.children)
261
262
  return;
262
263
  const children = vnode.children;
263
264
  (0, thread_1.Thread)(function () {
264
265
  if (vnode.destroyed || children !== vnode.children)
265
266
  return;
266
- for (let x = 0; x < children.length; x++)
267
+ for (let x = 0; !skipInit && x < children.length; x++)
267
268
  if (children[x].node === null) {
268
269
  const childNode = children[x];
269
270
  (0, thread_1.Schedule)(function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "j-templates",
3
- "version": "7.0.12",
3
+ "version": "7.0.13",
4
4
  "description": "j-templates",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/TypesInCode/jTemplates",