Skip to content

Commit a3a56dd

Browse files
committed
#7076 adjustment for the vnode ctor => opts.id ??= opts.componentId;
1 parent 27724f3 commit a3a56dd

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

src/util/vdom/TreeBuilder.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class TreeBuilder extends Base {
4949
if (currentItem.componentId) {
5050
// Prune the branch only if we are at the boundary AND the child is not part of a merged update
5151
if (depth === 1 && !mergedChildIds?.has(currentItem.componentId)) {
52-
currentItem = {componentId: 'neo-ignore', id: currentItem.id}
52+
currentItem = {componentId: 'neo-ignore', id: currentItem.id || currentItem.componentId};
5353
}
5454
// Expand the branch if it's part of a merged update, or if the depth requires it
5555
else if (depth > 1 || depth === -1 || mergedChildIds?.has(currentItem.componentId)) {
@@ -96,7 +96,7 @@ class TreeBuilder extends Base {
9696
if (currentItem.componentId) {
9797
// Prune the branch only if we are at the boundary AND the child is not part of a merged update
9898
if (depth === 1 && !mergedChildIds?.has(currentItem.componentId)) {
99-
currentItem = {componentId: 'neo-ignore', id: currentItem.id}
99+
currentItem = {componentId: 'neo-ignore', id: currentItem.id || currentItem.componentId};
100100
}
101101
// Expand the branch if it's part of a merged update, or if the depth requires it
102102
else if (depth > 1 || depth === -1 || mergedChildIds?.has(currentItem.componentId)) {

src/vdom/Helper.mjs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,6 @@ class Helper extends Base {
204204
let {deltas={default: [], remove: []}, oldVnode, vnode} = config,
205205
vnodeId = vnode?.id;
206206

207-
if (!vnode) {
208-
console.log(config);
209-
}
210-
211207
// Edge case: setting `removeDom: true` on a top-level vdom node
212208
if (!vnode && (oldVnode?.id || oldVnode?.componentId)) {
213209
deltas.remove.push({action: 'removeNode', id: oldVnode.id || oldVnode.componentId});

0 commit comments

Comments
 (0)