mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-20 07:46:37 +00:00
fix safari es6 bug (#950)
and also at least log the error we catch. (don't know why the catch is there, so not removing it)
This commit is contained in:
parent
73608a73e7
commit
26b9ddf3ed
@ -4,6 +4,8 @@
|
||||
<link rel='import' href='../../src/util/hass-util.html'>
|
||||
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
{
|
||||
const RECENT_THRESHOLD = 60000; // 1 minute
|
||||
const RECENT_CACHE = {};
|
||||
@ -14,7 +16,6 @@
|
||||
function computeHistory(stateHistory, localize, language) {
|
||||
const lineChartDevices = {};
|
||||
const timelineDevices = [];
|
||||
|
||||
if (!stateHistory) {
|
||||
return { line: [], timeline: [] };
|
||||
}
|
||||
@ -310,7 +311,9 @@
|
||||
}
|
||||
return cache.data;
|
||||
})
|
||||
.catch(() => {
|
||||
.catch((err) => {
|
||||
/* eslint-disable no-console */
|
||||
console.error(err);
|
||||
window.stateHistoryCache[cacheKey] = undefined;
|
||||
});
|
||||
cache.prom = prom;
|
||||
|
Loading…
x
Reference in New Issue
Block a user