e is an error and not a string, stops stack traces in the server log
parent
beaf391122
commit
bd6cb98c1e
2
rpc.js
2
rpc.js
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue