Landing pull request 459. Do not allow assumed cache[id] in jQuery.data. Fixes #8235.

More Details:
 - https://github.com/jquery/jquery/pull/459
 - http://bugs.jquery.com/ticket/8235
This commit is contained in:
Rick Waldron
2011-08-17 17:18:58 -04:00
committed by timmywil
parent 8537a740cd
commit 130a29e786

View File

@@ -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;
}