Skip to content

Commit

Permalink
Comment on the special casing for undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbachhuber committed Jul 5, 2018
1 parent 5bda8c1 commit 33d580d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core-blocks/audio/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class AudioEdit extends Component {
<SelectControl
label={ __( 'Preload' ) }
value={ undefined !== preload ? preload : 'none' }
// `undefined` is required for the preload attribute to be unset.
onChange={ ( value ) => setAttributes( { preload: 'none' !== value ? value : undefined } ) }
options={ [
{ value: 'auto', label: __( 'Auto' ) },
Expand Down

0 comments on commit 33d580d

Please sign in to comment.