Skip to content

Commit 8a3def3

Browse files
Merge pull request #96 from sparcs-kaist/rc
Release v3.3.2.1
2 parents 4ba25d0 + e367212 commit 8a3def3

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/pages/DictionaryPage.jsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ import CourseListTabs from '../components/sections/dictionary/courselist/CourseL
1414

1515
import { reset as resetCourseFocus, setCourseFocus } from '../redux/actions/dictionary/courseFocus';
1616
import {
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';
2323
import { performSearchCourses } from '../common/commonOperations';
2424
import { 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

Comments
 (0)