From bd6cb98c1ec17fd76d2a3bbe3db5289450158e07 Mon Sep 17 00:00:00 2001 From: Caleb James DeLisle Date: Tue, 19 Dec 2017 18:32:53 +0100 Subject: [PATCH] e is an error and not a string, stops stack traces in the server log --- rpc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc.js b/rpc.js index 410e5f22b..dc21968d1 100644 --- a/rpc.js +++ b/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);