WordPress.org

Make WordPress Core

Ticket #30951: 30951.diff

File 30951.diff, 484 bytes (added by westonruter, 7 years ago)

Always cast setting value to string in comparison with radio input value, since the latter will always be a string in the DOM.

  • src/wp-includes/js/customize-base.js

    diff --git src/wp-includes/js/customize-base.js src/wp-includes/js/customize-base.js
    index 5ffa924..2dc4c8e 100644
    window.wp = window.wp || {}; 
    491491        api.Element.synchronizer.radio = {
    492492                update: function( to ) {
    493493                        this.element.filter( function() {
    494                                 return this.value === to;
     494                                return this.value === String( to );
    495495                        }).prop( 'checked', true );
    496496                },
    497497                refresh: function() {