Show nothing on desktop when widget fails to retrieve information (#2)

* Show nothing on desktop when widget fails to retrieve information

* Switch to an arrow function
This commit is contained in:
Benjamin Scharf 2017-10-23 13:46:37 -05:00 committed by Shadowfacts
parent fa7bd26a54
commit 2051a80ffc
1 changed files with 1 additions and 1 deletions

View File

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