Work around error if assets array is empty

This commit is contained in:
Mikołaj Pich 2019-06-08 13:12:18 +02:00
parent 163a03cb0b
commit 2aee05b5c5
No known key found for this signature in database
GPG key ID: F62B26E36D4C4BAA

View file

@ -28,7 +28,7 @@
code: release.tag_name, code: release.tag_name,
released: release.published_at, released: release.published_at,
github: release.html_url, 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, id: release.id,
})); }));
}, },