neo.mjs 4.0.75 → 4.0.76

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo.mjs",
3
- "version": "4.0.75",
3
+ "version": "4.0.76",
4
4
  "description": "The webworkers driven UI framework",
5
5
  "type": "module",
6
6
  "repository": {
@@ -1567,22 +1567,24 @@ class Base extends CoreBase {
1567
1567
 
1568
1568
  // keep the vnode parent tree in sync
1569
1569
  ComponentManager.getParents(me).forEach((component, index) => {
1570
- if (!me.vnode) {
1571
- if (index === 0 && !VNodeUtil.removeChildVnode(component.vnode, me.id)) {
1572
- // This can fail, in case the vnode is already removed (not an issue, better safe than sorry)
1573
- // console.warn('syncVnodeTree: Could not remove the parent vnode for', me.id, component);
1570
+ if (component._vnode) {
1571
+ if (!me.vnode) {
1572
+ if (index === 0 && !VNodeUtil.removeChildVnode(component.vnode, me.id)) {
1573
+ // This can fail, in case the vnode is already removed (not an issue, better safe than sorry)
1574
+ // console.warn('syncVnodeTree: Could not remove the parent vnode for', me.id, component);
1575
+ }
1574
1576
  }
1575
- }
1576
1577
 
1577
- // check for dynamically rendered components which get inserted into the component tree
1578
- else if (index === 0 && me.vnode.outerHTML) {
1579
- // console.log('dyn item', me.vnode, me.parentIndex);
1580
- component.vnode.childNodes.splice(me.parentIndex || 0, 0, me.vnode);
1581
- }
1578
+ // check for dynamically rendered components which get inserted into the component tree
1579
+ else if (index === 0 && me.vnode.outerHTML) {
1580
+ // console.log('dyn item', me.vnode, me.parentIndex);
1581
+ component.vnode.childNodes.splice(me.parentIndex || 0, 0, me.vnode);
1582
+ }
1582
1583
 
1583
- else if (!VNodeUtil.replaceChildVnode(component.vnode, me.vnode.id, me.vnode)) {
1584
- // todo: can happen for dynamically inserted container items
1585
- // console.warn('syncVnodeTree: Could not replace the parent vnode for', me.vnode.id, component);
1584
+ else if (!VNodeUtil.replaceChildVnode(component.vnode, me.vnode.id, me.vnode)) {
1585
+ // todo: can happen for dynamically inserted container items
1586
+ // console.warn('syncVnodeTree: Could not replace the parent vnode for', me.vnode.id, component);
1587
+ }
1586
1588
  }
1587
1589
  });
1588
1590