From 2aee05b5c59fa86a727745f60dd145d145ae47d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Pich?= Date: Sat, 8 Jun 2019 13:12:18 +0200 Subject: [PATCH] Work around error if assets array is empty --- src/components/HomeDownloadBeta.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/HomeDownloadBeta.vue b/src/components/HomeDownloadBeta.vue index 2065dfc..9899d9d 100644 --- a/src/components/HomeDownloadBeta.vue +++ b/src/components/HomeDownloadBeta.vue @@ -28,7 +28,7 @@ code: release.tag_name, released: release.published_at, github: release.html_url, - download: release.assets[0].browser_download_url, + download: release.assets.length === 0 ? release.html_url : release.assets[0].browser_download_url, id: release.id, })); },