Skip to content

Commit c9267ab

Browse files
jbedarddmethvin
authored andcommitted
Only call jQuery(this) when needed. Close jquerygh-1260.
1 parent 47f56f1 commit c9267ab

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Isaac Z. Schlueter <[email protected]>
3333
Ismail Khair <[email protected]>
3434
James Burke <[email protected]>
3535
36+
3637
Jay Merrifield <[email protected]>
3738
3839
Jean Boussier <[email protected]>

AUTHORS.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,3 +167,4 @@ Michał Gołębiowski <[email protected]>
167167
Steven Benner <[email protected]>
168168
Li Xudong <[email protected]>
169169
Renato Oliveira dos Santos <[email protected]>
170+
Jason Bedard <[email protected]>

src/attributes.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,14 @@ jQuery.fn.extend({
182182
isFunction = jQuery.isFunction( value );
183183

184184
return this.each(function( i ) {
185-
var val,
186-
self = jQuery(this);
185+
var val;
187186

188187
if ( this.nodeType !== 1 ) {
189188
return;
190189
}
191190

192191
if ( isFunction ) {
193-
val = value.call( this, i, self.val() );
192+
val = value.call( this, i, jQuery( this ).val() );
194193
} else {
195194
val = value;
196195
}

0 commit comments

Comments
 (0)