@@ -14,12 +14,12 @@ import CourseListTabs from '../components/sections/dictionary/courselist/CourseL
1414
1515import { reset as resetCourseFocus , setCourseFocus } from '../redux/actions/dictionary/courseFocus' ;
1616import {
17+ clearSearchListCourses ,
1718 reset as resetList ,
18- setSelectedListCode ,
1919 setListCourses ,
20- clearSearchListCourses ,
20+ setSelectedListCode ,
2121} from '../redux/actions/dictionary/list' ;
22- import { reset as resetSearch , closeSearch } from '../redux/actions/dictionary/search' ;
22+ import { closeSearch , reset as resetSearch } from '../redux/actions/dictionary/search' ;
2323import { performSearchCourses } from '../common/commonOperations' ;
2424import { parseQueryString } from '@/common/utils/parseQueryString' ;
2525
@@ -55,11 +55,11 @@ class DictionaryPage extends Component {
5555 setSelectedListCodeDispatch ( startTab ) ;
5656 }
5757
58- if ( startSearchKeyword && startSearchKeyword . trim ( ) ) {
58+ if ( startSearchKeyword && startSearchKeyword . toString ( ) . trim ( ) ) {
5959 const LIMIT = 150 ;
6060
6161 const option = {
62- keyword : startSearchKeyword . trim ( ) ,
62+ keyword : startSearchKeyword . toString ( ) . trim ( ) ,
6363 } ;
6464 const beforeRequest = ( ) => {
6565 closeSearchDispatch ( ) ;
@@ -73,7 +73,10 @@ class DictionaryPage extends Component {
7373 setListCoursesDispatch ( CourseListCode . SEARCH , courses ) ;
7474 } ;
7575 performSearchCourses ( option , LIMIT , beforeRequest , afterResponse ) ;
76- } else if ( startSearchKeyword !== undefined && startSearchKeyword . trim ( ) . length === 0 ) {
76+ } else if (
77+ startSearchKeyword !== undefined &&
78+ startSearchKeyword . toString ( ) . trim ( ) . length === 0
79+ ) {
7780 // eslint-disable-next-line no-alert
7881 alert ( t ( 'ui.message.blankSearchKeyword' ) ) ;
7982 // eslint-disable-next-line no-useless-return
0 commit comments