From c1cb1976b5714c167bf7e14e1fd916fdf980808d Mon Sep 17 00:00:00 2001 From: Alexey Kasyanchuk Date: Tue, 27 Mar 2018 16:58:36 +0300 Subject: [PATCH] fix(top): remote top shown fix --- src/app/top-page.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/top-page.js b/src/app/top-page.js index 581710d..e4d1fb1 100644 --- a/src/app/top-page.js +++ b/src/app/top-page.js @@ -9,6 +9,7 @@ import RaisedButton from 'material-ui/RaisedButton'; import LinearProgress from 'material-ui/LinearProgress'; import {Tabs, Tab} from 'material-ui/Tabs'; +import _ from 'lodash' export default class TopPage extends Page { constructor(props) { @@ -56,6 +57,7 @@ export default class TopPage extends Page { this.remoteTopTorrents = ({torrents, type}) => { if(!torrents) return + type = type ? type : 'main' this.topTorrents[type] = _.orderBy(_.unionBy(this.topTorrents[type], torrents, 'hash'), ['seeders'], ['desc']) this.forceUpdate(); }