Fix a bug with mock GPX traces and delay
`Date.parse` returns milliseconds timestamp, not a `Date` object.
This commit is contained in:
parent
f0fc8f287d
commit
168f1b122c
@ -60,8 +60,8 @@ export function mockLocationWithGPX(index, setPosition) {
|
||||
setPosition(mockGPX[index]);
|
||||
if (mockGPX[index + 1]) {
|
||||
const delay = (
|
||||
Date.parse(mockGPX[index + 1].time).getTime()
|
||||
- Date.parse(mockGPX[index].time).getTime()
|
||||
Date.parse(mockGPX[index + 1].time)
|
||||
- Date.parse(mockGPX[index].time)
|
||||
);
|
||||
setTimeout(
|
||||
() => mockLocationWithGPX(index + 1, setPosition),
|
||||
|
Loading…
Reference in New Issue
Block a user