Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

DRY out removeData/cleanData #838

wants to merge 3 commits into


None yet
3 participants

gibson042 commented Jun 26, 2012

There was a great deal of duplicated code between jQuery.removeData and jQuery.cleanData, along with divergence which probably should not have happened. Let's sync them up.

Sizes - compared to master @ 3c86547

    255980      (-119)  dist/jquery.js
     93000      (-146)  dist/jquery.min.js
     33467       (-35)  dist/jquery.min.js.gz

@rwaldron rwaldron and 1 other commented on an outdated diff Jun 26, 2012

// don't care
// Ensure that `cache` is not a window object #10080
- if ( jQuery.support.deleteExpando || !cache.setInterval ) {
+ else if ( jQuery.support.deleteExpando || !jQuery.isWindow( cache ) ) {

rwaldron Jun 26, 2012


For the sake of readability, can you re-format this so there is no break-up from the if to the else if - thanks

@dmethvin dmethvin closed this in f8baea8 Jul 6, 2012

@mescoda mescoda pushed a commit to mescoda/jquery that referenced this pull request Nov 4, 2014

@gibson042 @dmethvin gibson042 + dmethvin DRY out removeData/cleanData, closes gh-838. 2f0d175
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment