From 130a29e78666def3b477056978406ea2fbcdad2b Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Wed, 17 Aug 2011 17:18:58 -0400 Subject: [PATCH] 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 --- src/data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.5