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 {
74
74
75
75
onKeyDown ( e ) {
76
76
const { inputlVal, selectedFilter } = this . state ;
77
- if ( inputlVal && e . which === 13 ) {
77
+ if ( _ . trim ( inputlVal ) && e . which === 13 ) {
78
78
const searchQuery = { } ;
79
79
if ( this . searchFieldRef && this . searchFieldRef . value ) {
80
80
if ( selectedFilter . name === 'Tags' ) {
@@ -90,7 +90,7 @@ export class SearchBarInner extends Component {
90
90
if ( selectedFilter . name !== 'Author' ) {
91
91
window . location . href = `${ config . TC_EDU_BASE_PATH } ${ config . TC_EDU_SEARCH_PATH } ?${ qs . stringify ( searchQuery ) } ` ;
92
92
} 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 ) } ` ;
94
94
}
95
95
}
96
96
}
You can’t perform that action at this time.
0 commit comments