guard against a possible typeError in the worker

pull/1/head
ansuz 4 years ago
parent ab9c7454f5
commit b4adf65dc8

@ -256,7 +256,7 @@ define([
Store.getPinnedUsage = function (clientId, data, cb) { Store.getPinnedUsage = function (clientId, data, cb) {
var s = getStore(data && data.teamId); var s = getStore(data && data.teamId);
if (!s.rpc) { return void cb({error: 'RPC_NOT_READY'}); } if (!s || !s.rpc) { return void cb({error: 'RPC_NOT_READY'}); }
s.rpc.getFileListSize(function (err, bytes) { s.rpc.getFileListSize(function (err, bytes) {
if (!s.id && typeof(bytes) === 'number') { if (!s.id && typeof(bytes) === 'number') {

Loading…
Cancel
Save