Skip to content

Commit

Permalink
Always try last_updated (#638)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus authored Jan 14, 2023
1 parent 16b2cbd commit 9508903
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/panels/hacs-experimental-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9508903

Please sign in to comment.