Bug Tracker

Ticket #2411: removeData.diff

File removeData.diff, 0.7 kB (added by flesler, 10 months ago)

These are the necessary changes

  • src/core.js

     
    692692            windowData : 
    693693            elem; 
    694694 
    695         var id = elem[ expando ]; 
     695        var id = elem[ expando ], ret; 
    696696 
    697697        // If we want to remove a specific section of the element's data 
    698698        if ( name ) { 
    699699            if ( jQuery.cache[ id ] ) { 
    700700                // Remove the section of cache data 
     701                ret = jQuery.cache[ id ][ name ]; 
    701702                delete jQuery.cache[ id ][ name ]; 
    702703 
    703704                // If we've removed all the data, remove the element's cache 
     
    725726            // Completely remove the data cache 
    726727            delete jQuery.cache[ id ]; 
    727728        } 
     729        return ret; 
    728730    }, 
    729731 
    730732    // args is for internal usage only