Skip to content

Commit

Permalink
Search block: Fix placeholder attribute receiving false instead of un…
Browse files Browse the repository at this point in the history
…defined
  • Loading branch information
noisysocks committed Feb 6, 2019
1 parent f3475f5 commit dffa8d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/search/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function SearchEdit( { className, attributes, setAttributes } ) {
// We hide the placeholder field's placeholder when there is a value. This
// stops screen readers from reading the placeholder field's placeholder
// which is confusing.
placeholder={ ! placeholder && __( 'Optional placeholder…' ) }
placeholder={ placeholder ? undefined : __( 'Optional placeholder…' ) }
value={ placeholder }
onChange={ ( event ) => setAttributes( { placeholder: event.target.value } ) }
/>
Expand Down

0 comments on commit dffa8d3

Please sign in to comment.