Avoid raising errors when fetchFromSvg fails
This commit is contained in:
parent
b59cee7123
commit
ad86099e1a
|
@ -4445,6 +4445,7 @@ function fetchFromSvg(request, url, cb) {
|
|||
try {
|
||||
var badge = buffer.replace(/(?:\r\n\s*|\r\s*|\n\s*)/g, '');
|
||||
var match = />([^<>]+)<\/text><\/g>/.exec(badge);
|
||||
if (!match) { return cb(Error('Cannot fetch from SVG:\n' + buffer)); }
|
||||
cb(null, match[1]);
|
||||
} catch(e) {
|
||||
cb(e);
|
||||
|
|
Loading…
Reference in New Issue
Block a user