fix the sorting feature

This commit is contained in:
jinhojang6 2019-07-13 01:30:04 +09:00
parent aef76dd105
commit 0a4ad08f1d
No known key found for this signature in database
GPG Key ID: CD8DAD05BB81C7BA
1 changed files with 2 additions and 2 deletions

View File

@ -17,8 +17,8 @@ class Main extends Component {
sortByLang() {
const { postList } = this.state
let newPostList = postList.sort((a,b)=> {
if (a.lang < b.lang) { return -1; }
if (a.lang > b.lang) { return 1; }
if (a.lang_en < b.lang_en) { return -1; }
if (a.lang_en > b.lang_en) { return 1; }
return 0;
});