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 8, 2018
1 parent eecaf13 commit 41579c7
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 41579c7

Please sign in to comment.