Fix error logger to only log if error is non-null
This commit is contained in:
parent
a0af0ccab5
commit
e92afcb203
|
@ -52,7 +52,9 @@ function getTorIPs(cb) {
|
||||||
fs.writeFile(destination,
|
fs.writeFile(destination,
|
||||||
ips.join("\n"),
|
ips.join("\n"),
|
||||||
error => {
|
error => {
|
||||||
|
if (error) {
|
||||||
LOGGER.error("Failed to write to %s: %s", destination, error);
|
LOGGER.error("Failed to write to %s: %s", destination, error);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue