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:
parent
fa7bd26a54
commit
2051a80ffc
|
@ -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)}">`);
|
||||||
|
|
Loading…
Reference in New Issue