Show nothing on desktop when widget fails to retrieve information

This commit is contained in:
Benjamin 2017-10-23 13:34:20 -05:00
parent fa7bd26a54
commit 1edbfcb2e5
1 changed files with 3 additions and 1 deletions

View File

@ -37,7 +37,9 @@ const cheerio = require("cheerio");
axios.get(`https://github.com/${options.user}`)
.then(generate)
.catch(console.error);
.catch(function (err) {
return
});
function generate(res) {
console.log(`<svg id="github-activity" width="${53 * options.size}" height="${7 * (options.size)}">`);