File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -92,8 +92,6 @@ export default class SearchForm extends React.Component {
9292 className = 'search-form-input' ;
9393 }
9494
95- console . log ( className ) ;
96-
9795 return className ;
9896 }
9997
Original file line number Diff line number Diff line change @@ -8,8 +8,12 @@ if ( searchFields.length ) {
88
99 for ( let i = 0 ; i < searchFields . length ; i ++ ) {
1010 const searchForm = searchFields [ i ] ;
11- const postType = searchForm . querySelector ( "input[name=post_type]" ) . value ;
11+ let postType = '' ;
1212
13+ if ( searchForm . querySelector ( 'input[name=post_type]' ) ) {
14+ postType = searchForm . querySelector ( 'input[name=post_type]' ) . value ;
15+ }
16+
1317 ReactDOM . render (
1418 < SearchForm postType = { postType } /> ,
1519 searchFields [ i ]
You can’t perform that action at this time.
0 commit comments