From e3c7cf5cc1da0eaaff37fd831f9837d409da873a Mon Sep 17 00:00:00 2001 From: Jon Cave Date: Tue, 9 Oct 2012 22:55:49 +0000 Subject: [PATCH] Remove allowed query args before checking isEmpty() in Query model. See #21390. git-svn-id: http://core.svn.wordpress.org/trunk@22149 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/js/media-models.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/js/media-models.js b/wp-includes/js/media-models.js index abc0bc73a5..59b34430d5 100644 --- a/wp-includes/js/media-models.js +++ b/wp-includes/js/media-models.js @@ -458,7 +458,7 @@ window.wp = window.wp || {}; // are no filters for other properties, so observing will result in // false positives in those queries. allowed = [ 's', 'order', 'orderby', 'posts_per_page', 'post_mime_type' ]; - if ( _( this.args ).chain().keys().difference().isEmpty().value() ) + if ( _( this.args ).chain().keys().difference( allowed ).isEmpty().value() ) this.observe( Attachments.all ); },