Skip to content

Commit 514d125

Browse files
committed
allow for null entities
1 parent 8a1268c commit 514d125

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/cache/Cache.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ export default class Cache {
182182
// Making these fetches sequentially ensures that the already fetched ranges of each
183183
// request are not fetched more than once
184184
for (const entity of entityGroup) {
185+
if (!entity.entity) continue;
185186
const entityKey = getEntityKey(entity);
186187
this.ranges[entityKey] ??= [];
187188
const offsetRange = [

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export type InputConfig = {
2121
title?: string;
2222
offset?: TimeDurationStr;
2323
entities: ({
24-
entity: string;
24+
entity?: string;
2525
attribute?: string;
2626
statistic?: StatisticType;
2727
period?: StatisticPeriod | "auto" | AutoPeriodConfig;

0 commit comments

Comments
 (0)