Skip to content

Commit

Permalink
Merge pull request #48 from metrico/develop
Browse files Browse the repository at this point in the history
fix: sipcapture/homer#625 used tsNs field for sorting of messages
  • Loading branch information
RFbkak37y3kIY authored Jan 9, 2024
2 parents 366ab78 + 061604d commit b571e35
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qxip-flow-panel",
"version": "10.0.9",
"version": "10.0.10",
"description": "Test plugin to lern dev enveroument",
"scripts": {
"build": "webpack -c ./.config/webpack/webpack.config.ts --env production",
Expand Down
12 changes: 9 additions & 3 deletions src/components/SimplePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,15 @@ function formattingDataAndSortIt(data: any, sortType = 'none') {
return unSortData;
}
const sortData = unSortData.sort((itemA: any, itemB: any) => {
const a = itemA.tsNs;
const b = itemB.tsNs;
return a < b ? -1 : a > b ? 1 : 0;
if (itemA.tsNs && itemB.tsNs) {
const a = itemA.tsNs;
const b = itemB.tsNs;
return a < b ? -1 : a > b ? 1 : 0;
} else {
const a = itemA.Time;
const b = itemB.Time;
return a < b ? -1 : a > b ? 1 : 0;
}
});
if (sortType === 'time_old') {
return sortData;
Expand Down

0 comments on commit b571e35

Please sign in to comment.