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 ef1ef39 commit c98f167Copy full SHA for c98f167
src/cache/Cache.ts
@@ -162,9 +162,11 @@ export default class Cache {
162
y === "unavailable" || y === "none" || y === "unknown" ? null : y
163
);
164
if (entity.extend_to_present && data.xs.length > 0 && entity.offset === 0) {
165
+ const last_i = data.xs.length - 1;
166
data.xs.push(new Date(Date.now() + entity.offset));
- data.ys.push(data.ys[data.ys.length - 1]);
167
- data.states.push(data.states[data.states.length - 1]);
+ data.ys.push(data.ys[last_i]);
168
+ if (data.states.length) data.states.push(data.states[last_i]);
169
+ if (data.statistics.length) data.statistics.push(data.statistics[last_i]);
170
}
171
return data;
172
0 commit comments