mirror of
https://github.com/beestat/app.git
synced 2025-07-09 03:04:07 -04:00
Fixed #195 - Runtime Detail gets stuck when end date range is today
This commit is contained in:
parent
7adfcb4b34
commit
f0a8f24b59
@ -72,11 +72,18 @@ beestat.component.card.runtime_detail.prototype.decorate_contents_ = function(pa
|
||||
);
|
||||
}
|
||||
|
||||
// Don't go before there's data.
|
||||
required_begin = moment.max(
|
||||
required_begin,
|
||||
moment(thermostat.first_connected)
|
||||
);
|
||||
|
||||
// Don't go after now.
|
||||
required_end = moment.min(
|
||||
required_end,
|
||||
moment().subtract(1, 'hour')
|
||||
);
|
||||
|
||||
/**
|
||||
* If the needed data exists in the database and the runtime_thermostat
|
||||
* cache is empty, then query the data. If the needed data does not exist in
|
||||
|
Loading…
x
Reference in New Issue
Block a user