check before setting languages

This commit is contained in:
hazycora 2023-08-02 22:50:41 -05:00
parent ffe5e13a80
commit 884d9d2290
No known key found for this signature in database
GPG key ID: 215AF1F81F86940E

View file

@ -75,7 +75,9 @@ app.get('/:owner/:repo/issue/:num', async function (req, res) {
req.params.owner
)}/${encodeURIComponent(req.params.repo)}/languages`
)
if (languagesResp.ok) {
languages = getLanguagePercentages(await languagesResp.json())
}
const html = await eta.renderAsync('issue', {
issue,
languages,