Skip to content

Commit 51d61cf

Browse files
committed
fix out of range removal
1 parent 82077f6 commit 51d61cf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/plotly-graph-card.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ function removeOutOfRange(xs: Datum[], ys: Datum[], range: TimestampRange) {
7070
if (xs[i]! > range[1]) last = i;
7171
}
7272
if (last > -1) {
73-
xs = xs.splice(last);
74-
ys = ys.splice(last);
73+
xs.splice(last);
74+
ys.splice(last);
7575
}
7676
if (first > -1) {
77-
xs = xs.splice(0, first);
78-
ys = ys.splice(0, first);
77+
xs.splice(0, first);
78+
ys.splice(0, first);
7979
}
8080
}
8181

0 commit comments

Comments
 (0)