Skip to content

Commit 654c062

Browse files
committed
Fixed undefined diff func.
1 parent 784f4bf commit 654c062

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/admin/trades.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ var TradesListController = ($scope : TradesScope, $log : ng.ILogService, subscri
6161
headerRowHeight: 20,
6262
columnDefs: [
6363
{width: 75, field:'time', displayName:'t', cellFilter: 'momentShortDate',
64-
sortingAlgorithm: (a: moment.Moment, b: moment.Moment) => a.diff(b),
64+
sortingAlgorithm: (a: moment.Moment, b: moment.Moment) => (moment.isMoment(a) ? a : moment(a)).diff(b),
6565
sort: { direction: uiGridConstants.DESC, priority: 1} },
6666
{width: 50, field:'price', displayName:'px', cellFilter: 'currency', cellClass: (grid, row, col, rowRenderIndex, colRenderIndex) => {
6767
if (row.entity.side === 'K') return (row.entity.price > row.entity.allocprice) ? "sell" : "buy"; else return "";

0 commit comments

Comments
 (0)