Skip to content

Commit

Permalink
Fix dashboard bug on color + multilevel device feature (#1031)
Browse files Browse the repository at this point in the history
Co-authored-by: Pierre-Gilles Leymarie <pierregilles.leymarie@gmail.com>
  • Loading branch information
atrovato and Pierre-Gilles authored Jan 5, 2021
1 parent b745283 commit ad845d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class ColorDeviceType extends Component {

componentDidMount() {
const deviceLastValue = this.props.deviceFeature.last_value;
const color = deviceLastValue === null ? undefined : `#${intToHex(deviceLastValue)}`;
const color = !deviceLastValue ? undefined : `#${intToHex(deviceLastValue)}`;

this.colorPicker = new iro.ColorPicker(this.colorPickerRef.current, {
width: 150,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const MultiLevelDeviceType = ({ children, ...props }) => {
props.y,
props.device,
props.deviceFeature,
props.roomIndex,
props.deviceIndex,
props.deviceFeatureIndex,
e.target.value,
props.deviceFeature.lastValue
Expand Down

0 comments on commit ad845d5

Please sign in to comment.