Show nothing on desktop when widget fails to retrieve information
This commit is contained in:
parent
fa7bd26a54
commit
1edbfcb2e5
|
@ -37,7 +37,9 @@ 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 (err) {
|
||||||
|
return
|
||||||
|
});
|
||||||
|
|
||||||
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