From: Rick Waldron Date: Wed, 17 Aug 2011 21:18:58 +0000 (-0400) Subject: Landing pull request 459. Do not allow assumed cache[id] in jQuery.data. Fixes #8235. X-Git-Tag: 1.6.3rc1~14 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=130a29e78666def3b477056978406ea2fbcdad2b;p=jquery.git 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 --- diff --git a/src/data.js b/src/data.js index 279471075..4f87a3550 100644 --- a/src/data.js +++ b/src/data.js @@ -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; }