From 5642b10c721b1c1bddf4c0e2952ff2865d91e047 Mon Sep 17 00:00:00 2001 From: sgenoud Date: Wed, 10 Apr 2019 16:57:37 +0200 Subject: [PATCH] fix: Add hostname when description is missing (#1145) --- src/routes/_components/status/StatusCard.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/_components/status/StatusCard.html b/src/routes/_components/status/StatusCard.html index b30f67f..021e81a 100644 --- a/src/routes/_components/status/StatusCard.html +++ b/src/routes/_components/status/StatusCard.html @@ -86,7 +86,8 @@ card: ({ originalStatus }) => originalStatus.card, title: ({ card }) => card.title, url: ({ card }) => card.url, - description: ({ card }) => card.description || card.provider_name, + hostname: ({ url }) => window.URL ? new window.URL(url).hostname : '', + description: ({ card, hostname }) => card.description || card.provider_name || hostname, imageUrl: ({ card }) => card.image }, methods: {