From 950890399824304690ba53a2267c1298113b9f07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Sat, 14 Jan 2023 14:46:57 +0100 Subject: [PATCH] Always try last_updated (#638) --- src/panels/hacs-experimental-panel.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/panels/hacs-experimental-panel.ts b/src/panels/hacs-experimental-panel.ts index 1ec8d95d..1124206a 100644 --- a/src/panels/hacs-experimental-panel.ts +++ b/src/panels/hacs-experimental-panel.ts @@ -405,8 +405,13 @@ export class HacsExperimentalPanel extends LitElement { sortable: true, direction: this.activeSort?.column === "last_updated" ? this.activeSort.direction : null, width: "15%", - template: (last_updated: string, repository: RepositoryBase) => - repository.new ? "-" : relativeTime(new Date(last_updated), this.hass.locale), + template: (last_updated: string, _: RepositoryBase) => { + try { + return relativeTime(new Date(last_updated), this.hass.locale); + } catch (e) { + return "-"; + } + }, }, installed_version: { ...defaultKeyData,