We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7dda60d commit 5e37c7fCopy full SHA for 5e37c7f
src/api.js
@@ -136,7 +136,11 @@ export const getUserDeviceLocationHistory = async (
136
fetchOptions
137
);
138
const json = await response.json();
139
- const userDeviceLocationHistory = json.data;
+ // We need to manually sort by timestamp, otherwise the line segments may be
140
+ // drawn in the wrong order. The recorder API simply returns entries in the
141
+ // same order in which they are in each *.rec file.
142
+ // See https://github.com/owntracks/frontend/issues/67.
143
+ const userDeviceLocationHistory = json.data.sort((a, b) => a.tst - b.tst);
144
log(
145
"API",
146
() =>
0 commit comments