From f44d5e1e815ce63b58264b2f9a764c0b03101cfc Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Wed, 17 Aug 2011 17:49:09 -0400 Subject: [PATCH] Ensure cache[id] exists before attempting to delete it. Fixes #10080 --- src/data.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/data.js b/src/data.js index 4f87a3550..936cd76b8 100644 --- a/src/data.js +++ b/src/data.js @@ -191,7 +191,8 @@ jQuery.extend({ // Browsers that fail expando deletion also refuse to delete expandos on // the window, but it will allow it on all other JS objects; other browsers // don't care - if ( jQuery.support.deleteExpando || cache != window ) { + // Ensure that this id actually exists in `cache` #10080 + if ( cache[ id ] && ( jQuery.support.deleteExpando || cache != window ) ) { delete cache[ id ]; } else { cache[ id ] = null; -- 2.39.5