ソースを参照

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;
});
});
}



読み込み中…
キャンセル
保存