Make WordPress Core

Changeset 59037


Ignore:
Timestamp:
09/17/2024 10:24:43 PM (3 months ago)
Author:
antpb
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/media/views/modal.js

    r59035 r59037  
    191191        var selection = this.controller.state().get( 'selection' );
    192192
    193         if ( ! selection.length > 0 ) {
     193        if ( selection.length <= 0 ) {
    194194            return;
    195195        }
Note: See TracChangeset for help on using the changeset viewer.