()
| 341 | // --------------------------------------------------------------------------- |
| 342 | |
| 343 | async function refreshMeta() { |
| 344 | try { |
| 345 | const meta = await api('/api/meta'); |
| 346 | if (meta.latest_day) state.anchor = meta.latest_day; |
| 347 | state.earliest = meta.earliest_day ?? null; |
| 348 | syncFilters(); |
| 349 | } catch { |
| 350 | // A meta failure is not fatal: the picker falls back to today's date and |
| 351 | // every panel still answers. The banner is what says so. |
| 352 | document.getElementById('data-through').textContent = 'Could not read the data range.'; |
| 353 | } |
| 354 | } |
| 355 | |
| 356 | async function render() { |
| 357 | const token = ++state.renderToken; |
no test coverage detected