Precompute the parts array; clean up a JSLint complaint.

Followup to 6c2a501de4 for bug #5571.
This commit is contained in:
Dave Methvin 2011-12-06 20:07:29 -05:00
parent 6aa4095ed6
commit 2c75a993be

View File

@ -281,10 +281,11 @@ jQuery.fn.extend({
});
}
parts = key.split( ".", 2 );
parts[1] = parts[1] ? "." + parts[1] : "";
part = parts[1] + "!";
return jQuery.access( this, function( value ) {
parts = key.split( ".", 2 ),
parts[1] = parts[1] ? "." + parts[1] : "";
part = parts[1] + "!";
if ( value === undefined ) {
data = this.triggerHandler( "getData" + part, [ parts[0] ] );