Skip to content

Commit

Permalink
fix: another caching issue with statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
RomRider committed Apr 22, 2022
1 parent 4656d59 commit b93ee75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/apexcharts-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,9 @@ class ChartsCard extends LitElement {

if (serie.entity) {
const editMode = getLovelace()?.editMode;
// disable caching for editor or statistics data
// disable caching for editor
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const caching = editMode === true || serie.statistics ? false : this._config!.cache;
const caching = editMode === true ? false : this._config!.cache;
const graphEntry = new GraphEntry(
index,
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
Expand Down
2 changes: 1 addition & 1 deletion src/graphEntry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default class GraphEntry {
diff: this._diff,
};
this._index = index;
this._cache = cache;
this._cache = config.statistics ? false : cache;
this._entityID = config.entity;
this._graphSpan = graphSpan;
this._config = config;
Expand Down

0 comments on commit b93ee75

Please sign in to comment.