Skip to content

Commit

Permalink
Remove unneeded code from fixUpContinuousNodeArray.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbest committed Oct 20, 2015
1 parent 2452d94 commit 66254ac
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ ko.utils = (function () {

// Rule [B]
while (continuousNodeArray.length > 1 && continuousNodeArray[continuousNodeArray.length - 1].parentNode !== parentNode)
continuousNodeArray.splice(-1, 1);
continuousNodeArray.length--;

// Rule [C]
if (continuousNodeArray.length > 1) {
Expand All @@ -282,10 +282,6 @@ ko.utils = (function () {
while (current !== last) {
continuousNodeArray.push(current);
current = current.nextSibling;
if (!current) { // Won't happen, except if the developer has manually removed some DOM elements (then we're in an undefined scenario)
continuousNodeArray.length = 0;
return continuousNodeArray;
}
}
continuousNodeArray.push(last);
}
Expand Down

0 comments on commit 66254ac

Please sign in to comment.