Coding Standards: Avoid using confusing ! condition in Media Library selection check.

Checks that value is now equal or less than or equal to 0 which has the same result as the previous confusing `!` usage.

Props kadamwhite, drjosh07.
See #60369.


git-svn-id: https://develop.svn.wordpress.org/trunk@59037 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Anthony Burchell 2024-09-17 22:24:43 +00:00
parent 15b7d2a868
commit 98a9f6481a

View File

@ -190,7 +190,7 @@ Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{
selectHandler: function( event ) {
var selection = this.controller.state().get( 'selection' );
if ( ! selection.length > 0 ) {
if ( selection.length <= 0 ) {
return;
}