e is an error and not a string, stops stack traces in the server log

This commit is contained in:
Caleb James DeLisle 2017-12-19 18:32:53 +01:00
parent beaf391122
commit bd6cb98c1e
1 changed files with 1 additions and 1 deletions

2
rpc.js
View File

@ -310,7 +310,7 @@ var getFileSize = function (Env, channel, cb) {
return void Env.msgStore.getChannelSize(channel, function (e, size /*:number*/) {
if (e) {
if (e === 'ENOENT') { return void cb(void 0, 0); }
if (e.code === 'ENOENT') { return void cb(void 0, 0); }
return void cb(e.code);
}
cb(void 0, size);