@@ -116,6 +116,9 @@ export function diffChildren(
116116 childVNode . _flags & INSERT_VNODE ||
117117 oldVNode . _children === childVNode . _children
118118 ) {
119+ if ( ! newDom && oldVNode . _dom == oldDom ) {
120+ oldDom = getDomSibling ( oldVNode ) ;
121+ }
119122 oldDom = insert ( childVNode , oldDom , parentDom ) ;
120123 } else if (
121124 typeof childVNode . type == 'function' &&
@@ -229,11 +232,6 @@ function constructNewChildrenArray(newParentVNode, renderResult, oldChildren) {
229232
230233 const skewedIndex = i + skew ;
231234
232- console . log (
233- 'hi' ,
234- childVNode && childVNode . type ,
235- childVNode && childVNode . key
236- ) ;
237235 // Handle unmounting null placeholders, i.e. VNode => null in unkeyed children
238236 if ( childVNode == null ) {
239237 oldVNode = oldChildren [ skewedIndex ] ;
@@ -244,17 +242,8 @@ function constructNewChildrenArray(newParentVNode, renderResult, oldChildren) {
244242 ( oldVNode . _flags & MATCHED ) === 0
245243 ) {
246244 if ( oldVNode . _dom == newParentVNode . _nextDom ) {
247- console . log ( newParentVNode . _parent . _nextDom ) ;
248- if ( newParentVNode . _parent . _nextDom === oldVNode . _dom ) {
249- newParentVNode . _parent . _nextDom = getDomSibling ( oldVNode ) ;
250- }
251245 newParentVNode . _nextDom = getDomSibling ( oldVNode ) ;
252246 }
253- console . log (
254- 'setting early unmount' ,
255- newParentVNode . type ,
256- newParentVNode . _nextDom
257- ) ;
258247
259248 unmount ( oldVNode , oldVNode , false ) ;
260249
@@ -386,7 +375,6 @@ function insert(parentVNode, oldDom, parentDom) {
386375 oldDom = oldDom && oldDom . nextSibling ;
387376 } while ( oldDom != null && oldDom . nodeType === 8 ) ;
388377
389- console . log ( 'returning from insert' , oldDom ) ;
390378 return oldDom ;
391379}
392380
0 commit comments