File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -187,14 +187,6 @@ var Idiomorph = (function () {
187187 */
188188 function morphOuterHTML ( ctx , oldNode , newNode ) {
189189 const oldParent = normalizeParent ( oldNode ) ;
190-
191- // basis for calulating which nodes were morphed
192- // since there may be unmorphed sibling nodes
193- let childNodes = Array . from ( oldParent . childNodes ) ;
194- const index = childNodes . indexOf ( oldNode ) ;
195- // how many elements are to the right of the oldNode
196- const rightMargin = childNodes . length - ( index + 1 ) ;
197-
198190 morphChildren (
199191 ctx ,
200192 oldParent ,
@@ -203,10 +195,8 @@ var Idiomorph = (function () {
203195 oldNode , // start point for iteration
204196 oldNode . nextSibling , // end point for iteration
205197 ) ;
206-
207- // return just the morphed nodes
208- childNodes = Array . from ( oldParent . childNodes ) ;
209- return childNodes . slice ( index , childNodes . length - rightMargin ) ;
198+ // this is safe even with siblings, because normalizeParent returns a SlicedParentNode if needed.
199+ return Array . from ( oldParent . childNodes ) ;
210200 }
211201
212202 /**
You can’t perform that action at this time.
0 commit comments