Skip to content

Commit 130a29e

Browse files
rwaldrontimmywil
authored andcommitted
Landing pull request 459. Do not allow assumed cache[id] in jQuery.data. Fixes #8235.
More Details: - jquery#459 - http://bugs.jquery.com/ticket/8235
1 parent 8537a74 commit 130a29e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/data.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jQuery.extend({
5151

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

0 commit comments

Comments
 (0)