if nodes instanceof Node

This commit is contained in:
Nicolas Stepien 2012-03-08 06:29:39 +01:00
parent 29617d64ef
commit d7b6b0823a
2 changed files with 2 additions and 2 deletions

View File

@ -419,7 +419,7 @@
},
nodes: function(nodes) {
var frag, node, _i, _len;
if (!(nodes instanceof Array)) return nodes;
if (nodes instanceof Node) return nodes;
frag = d.createDocumentFragment();
for (_i = 0, _len = nodes.length; _i < _len; _i++) {
node = nodes[_i];

View File

@ -335,7 +335,7 @@ $.extend $,
tn: (s) ->
d.createTextNode s
nodes: (nodes) ->
unless nodes instanceof Array
if nodes instanceof Node
return nodes
frag = d.createDocumentFragment()
for node in nodes