diff --git a/src/admin/trades.ts b/src/admin/trades.ts index d4b7e6b16..eafe5fefa 100644 --- a/src/admin/trades.ts +++ b/src/admin/trades.ts @@ -61,7 +61,7 @@ var TradesListController = ($scope : TradesScope, $log : ng.ILogService, subscri headerRowHeight: 20, columnDefs: [ {width: 75, field:'time', displayName:'t', cellFilter: 'momentShortDate', - sortingAlgorithm: (a: moment.Moment, b: moment.Moment) => a.diff(b), + sortingAlgorithm: (a: moment.Moment, b: moment.Moment) => (moment.isMoment(a) ? a : moment(a)).diff(b), sort: { direction: uiGridConstants.DESC, priority: 1} }, {width: 50, field:'price', displayName:'px', cellFilter: 'currency', cellClass: (grid, row, col, rowRenderIndex, colRenderIndex) => { if (row.entity.side === 'K') return (row.entity.price > row.entity.allocprice) ? "sell" : "buy"; else return "";