WordPress.org

Make WordPress Core

Ticket #21390: 21390-difference-allowed.diff

File 21390-difference-allowed.diff, 617 bytes (added by duck_, 2 years ago)
  • wp-includes/js/media-models.js

     
    459459                        // are no filters for other properties, so observing will result in 
    460460                        // false positives in those queries. 
    461461                        allowed = [ 's', 'order', 'orderby', 'posts_per_page', 'post_mime_type' ]; 
    462                         if ( _( this.args ).chain().keys().difference().isEmpty().value() ) 
     462                        if ( _( this.args ).chain().keys().difference(allowed).isEmpty().value() ) 
    463463                                this.observe( Attachments.all ); 
    464464                }, 
    465465