j-templates 7.0.99 → 7.0.100

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.
@@ -174,20 +174,22 @@ exports.DOMNodeConfig = {
174
174
  let inNextChildren = false;
175
175
  for (let x = 0; x < children.length; x++) {
176
176
  const nextChild = (lastChild = getHTMLNode(children[x], currentChild));
177
- if (!currentChild)
178
- target.appendChild(nextChild);
179
- else if (nextChild !== currentChild) {
180
- while (currentChild && (!(inNextChildren = inNextChildren || children.indexOf(currentChild, x + 1) >= 0))) {
181
- const toRemove = currentChild;
182
- currentChild = currentChild.nextSibling;
183
- target.removeChild(toRemove);
177
+ if (nextChild !== null) {
178
+ if (!currentChild)
179
+ target.appendChild(nextChild);
180
+ else if (nextChild !== currentChild) {
181
+ while (currentChild && (!(inNextChildren = inNextChildren || children.indexOf(currentChild, x + 1) >= 0))) {
182
+ const toRemove = currentChild;
183
+ currentChild = currentChild.nextSibling;
184
+ target.removeChild(toRemove);
185
+ }
186
+ nextChild !== currentChild &&
187
+ target.insertBefore(nextChild, currentChild);
184
188
  }
185
- nextChild !== currentChild &&
186
- target.insertBefore(nextChild, currentChild);
189
+ else
190
+ inNextChildren = false;
191
+ currentChild = nextChild.nextSibling;
187
192
  }
188
- else
189
- inNextChildren = false;
190
- currentChild = nextChild.nextSibling;
191
193
  }
192
194
  break;
193
195
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "j-templates",
3
- "version": "7.0.99",
3
+ "version": "7.0.100",
4
4
  "description": "j-templates",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/TypesInCode/jTemplates",