Skip to content

Commit

Permalink
Fixed undefined diff func.
Browse files Browse the repository at this point in the history
  • Loading branch information
ctubio committed Jul 31, 2016
1 parent 784f4bf commit 654c062
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/admin/trades.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 "";
Expand Down

0 comments on commit 654c062

Please sign in to comment.