Make WordPress Core

Changeset 29507


Ignore:
Timestamp:
08/15/2014 06:59:25 PM (10 years ago)
Author:
wonderboymusic
Message:

Media Grid: $.when expects a splat. Disambiguation: change cache to refresh as the arg name for _requery().

See [29490], #29145.

Location:
trunk/src/wp-includes/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/media-models.js

    r29490 r29507  
    825825         * @access private
    826826         */
    827         _requery: function( cache ) {
     827        _requery: function( refresh ) {
    828828            var props;
    829829            if ( this.props.get('query') ) {
    830830                props = this.props.toJSON();
    831                 props.cache = ( true !== cache );
     831                props.cache = ( true !== refresh || _.isUndefined( refresh ) );
    832832                this.mirror( Query.get( props ) );
    833833            }
  • trunk/src/wp-includes/js/media-views.js

    r29494 r29507  
    59075907
    59085908                        if ( changed.length ) {
    5909                             $.when( changed ).then( function() {
     5909                            $.when.apply( null, changed ).then( function() {
    59105910                                library._requery( true );
    59115911                            } );
Note: See TracChangeset for help on using the changeset viewer.