Skip to content
Permalink
Browse files

Precompute the parts array; clean up a JSLint complaint.

Followup to 6c2a501 for bug #5571.
  • Loading branch information...
dmethvin committed Dec 7, 2011
1 parent 6aa4095 commit 2c75a993be712ceb5da4eee9810f562b90fd7e23
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/data.js
@@ -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] ] );

0 comments on commit 2c75a99

Please sign in to comment.
You can’t perform that action at this time.