WordPress.org

Make WordPress Core

Changeset 28371


Ignore:
Timestamp:
05/11/2014 07:02:05 AM (6 years ago)
Author:
wonderboymusic
Message:

In wp.media.view.Settings::update(), when handling checkboxes, check for a value of 'false' in addition to casting value to boolean. !! 'false' evaluates to true.

Props adamsilverstein.
Fixes #23954.

File:
1 edited

Legend:

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

    r28189 r28371  
    57155715            // Handle checkboxes.
    57165716            } else if ( $setting.is('input[type="checkbox"]') ) {
    5717                 $setting.prop( 'checked', !! value );
     5717                $setting.prop( 'checked', !! value && 'false' !== value );
    57185718            }
    57195719        },
Note: See TracChangeset for help on using the changeset viewer.