Skip to content

Commit

Permalink
Streamline logic in anyDomNodeIsAttachedToDocument
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveSanderson committed Dec 4, 2012
1 parent 026cf04 commit 6205bf5
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,7 @@ ko.utils = new (function () {
},

anyDomNodeIsAttachedToDocument: function(nodes) {
for (var i = 0, j = nodes.length; i < j; i++) {
if (ko.utils.domNodeIsAttachedToDocument(nodes[i])) {
return true;
}
}
return false;
return !!ko.utils.arrayFirst(nodes, ko.utils.domNodeIsAttachedToDocument);
},

tagNameLower: function(element) {
Expand Down

0 comments on commit 6205bf5

Please sign in to comment.