Skip to content

Commit 7ff20c5

Browse files
authored
Merge pull request #817 from NemeZZiZZ/fix/overlay-pressed-point-timestamp-guard
fix: guard overlay timestamp assignment against undefined in pressed move
2 parents 385c57c + 4c813ff commit 7ff20c5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/component/Overlay.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,9 @@ export default class OverlayImp<E = unknown> implements Overlay<E> {
410410
}
411411

412412
eventPressedPointMove(point: Partial<Point>, pointIndex: number): void {
413-
this.points[pointIndex].timestamp = point.timestamp
413+
if (isNumber(point.timestamp)) {
414+
this.points[pointIndex].timestamp = point.timestamp
415+
}
414416
if (isNumber(point.dataIndex)) {
415417
this.points[pointIndex].dataIndex = point.dataIndex
416418
}

0 commit comments

Comments
 (0)