Skip to content

Commit

Permalink
Landing pull request 459. Do not allow assumed cache[id] in jQuery.da…
Browse files Browse the repository at this point in the history
…ta. Fixes #8235.

More Details:
 - jquery#459
 - http://bugs.jquery.com/ticket/8235
  • Loading branch information
rwaldron authored and timmywil committed Aug 17, 2011
1 parent 8537a74 commit 130a29e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jQuery.extend({

// Avoid doing any more work than we need to when trying to get data on an
// object that has no data at all
if ( (!id || (pvt && id && !cache[ id ][ internalKey ])) && getByName && data === undefined ) {
if ( (!id || (pvt && id && (cache[ id ] && !cache[ id ][ internalKey ]))) && getByName && data === undefined ) {
return;
}

Expand Down

0 comments on commit 130a29e

Please sign in to comment.