File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/shared/components/Contentful/SearchBar Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ export class SearchBarInner extends Component {
7474
7575 onKeyDown ( e ) {
7676 const { inputlVal, selectedFilter } = this . state ;
77- if ( inputlVal && e . which === 13 ) {
77+ if ( _ . trim ( inputlVal ) && e . which === 13 ) {
7878 const searchQuery = { } ;
7979 if ( this . searchFieldRef && this . searchFieldRef . value ) {
8080 if ( selectedFilter . name === 'Tags' ) {
@@ -90,7 +90,7 @@ export class SearchBarInner extends Component {
9090 if ( selectedFilter . name !== 'Author' ) {
9191 window . location . href = `${ config . TC_EDU_BASE_PATH } ${ config . TC_EDU_SEARCH_PATH } ?${ qs . stringify ( searchQuery ) } ` ;
9292 } else {
93- window . location . href = `${ config . TC_EDU_BASE_PATH } ${ config . TC_EDU_SEARCH_PATH } ?author=${ inputlVal } ` ;
93+ window . location . href = `${ config . TC_EDU_BASE_PATH } ${ config . TC_EDU_SEARCH_PATH } ?author=${ _ . trim ( inputlVal ) } ` ;
9494 }
9595 }
9696 }
You can’t perform that action at this time.
0 commit comments