Skip to content

Commit

Permalink
Fix build errors on constants
Browse files Browse the repository at this point in the history
  • Loading branch information
amaximus committed May 26, 2022
1 parent 87cf141 commit c938be6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ha-sankey-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,9 @@ export class SankeyChart extends LitElement {

let finalColor = entityConf.color || 'var(--primary-color)';
if (typeof entityConf.color_on_state != 'undefined' && entityConf.color_on_state) {
let colorLimit = typeof entityConf.color_limit === 'undefined' ? 1 : entityConf.color_limit;
let colorBelow = typeof entityConf.color_below === 'undefined' ? 'var(--primary-color)' : entityConf.color_below;
let colorAbove = typeof entityConf.color_above === 'undefined' ? 'var(--paper-item-icon-color)' : entityConf.color_above;
const colorLimit = typeof entityConf.color_limit === 'undefined' ? 1 : entityConf.color_limit;
const colorBelow = typeof entityConf.color_below === 'undefined' ? 'var(--primary-color)' : entityConf.color_below;
const colorAbove = typeof entityConf.color_above === 'undefined' ? 'var(--paper-item-icon-color)' : entityConf.color_above;
finalColor = state > colorLimit ? colorAbove : colorBelow;
}

Expand Down

0 comments on commit c938be6

Please sign in to comment.