Commit dee8e45e authored by John Resig's avatar John Resig

Removed the use of this.length++ as it makes it hard to use the init method directly. Fixes #4955.

parent ca8a9e8c
......@@ -56,7 +56,7 @@ jQuery.fn = jQuery.prototype = {
// Handle $(DOMElement)
if ( selector.nodeType ) {
this.context = this[0] = selector;
this.length++;
this.length = 1;
return this;
}
......@@ -96,7 +96,7 @@ jQuery.fn = jQuery.prototype = {
}
// Otherwise, we inject the element directly into the jQuery object
this.length++;
this.length = 1;
this[0] = elem;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment