Skip to content

Commit 0926d42

Browse files
authored
Fix entities getting mixed in the plot. Solves #120 (#121)
1 parent 8ff1cf7 commit 0926d42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cache/Cache.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ export default class Cache {
138138
[range[1] + 1, Number.POSITIVE_INFINITY],
139139
])
140140
);
141-
let first: History[0];
142-
let last: History[0];
143141
this.histories = mapValues(this.histories, (history) => {
142+
let first: History[0] | undefined;
143+
let last: History[0] | undefined;
144144
const newHistory = history.filter((datum) => {
145145
if (datum.last_updated <= range[0]) first = datum;
146146
else if (!last && datum.last_updated >= range[1]) last = datum;

0 commit comments

Comments
 (0)