Commit f44d5e1e authored by Rick Waldron's avatar Rick Waldron

Ensure cache[id] exists before attempting to delete it. Fixes #10080

parent 1a738cb7
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment