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) {
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) {
if (!s.id && typeof(bytes) === 'number') {

Loading…
Cancel
Save