diff options
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/users.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/routes/users.js b/routes/users.js index 4ef67d2c..70d9231c 100644 --- a/routes/users.js +++ b/routes/users.js @@ -59,7 +59,9 @@ path = "public/assets/img/logos/" + obj.username + "." + ext; fs.lstat(path, function(err, stats) { if ((ext === 'jpg' || ext === 'png' || ext === 'gif') && (err || !stats.isFile())) { - return request("" + obj.logo).pipe(fs.createWriteStream(path)); + try { + return request("" + obj.logo).pipe(fs.createWriteStream(path)); + } catch (_error) {} } }); } |
