diff --git a/lib/commands/pin-rpc.js b/lib/commands/pin-rpc.js index f3ade0489..258c6f53b 100644 --- a/lib/commands/pin-rpc.js +++ b/lib/commands/pin-rpc.js @@ -56,9 +56,13 @@ var loadUserPins = function (Env, safeKey, cb) { }; var truthyKeys = function (O) { - return Object.keys(O).filter(function (k) { - return O[k]; - }); + try { + return Object.keys(O).filter(function (k) { + return O[k]; + }); + } catch (err) { + return []; + } }; var getChannelList = Pinning.getChannelList = function (Env, safeKey, _cb) {