소스 검색

Check for empty "last_status" before sorting DM column (#9207)

* Check for empty "last_status" before sorting

* Small touchups for codeclimate
master
Steven Tappert 5 년 전
committed by Eugen Rochko
부모
커밋
a7e3bd0300
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. +7
    -1
      app/javascript/mastodon/reducers/conversations.js

+ 7
- 1
app/javascript/mastodon/reducers/conversations.js 파일 보기

@@ -56,7 +56,13 @@ const expandNormalizedConversations = (state, conversations, next) => {

list = list.concat(items);

return list.sortBy(x => x.get('last_status'), (a, b) => compareId(a, b) * -1);
return list.sortBy(x => x.get('last_status'), (a, b) => {
if(a === null || b === null) {
return -1;
}

return compareId(a, b) * -1;
});
});
}



불러오는 중...
취소
저장