Fix safe links for pads stored in teams
parent
224fae35aa
commit
b33225e2d7
|
@ -964,9 +964,11 @@ define([
|
|||
// Get data about a given channel: use with hidden hashes
|
||||
common.getPadDataFromChannel = function (obj, cb) {
|
||||
if (!obj || !obj.channel) { return void cb('EINVAL'); }
|
||||
// Note: no timeout for this command, we may only have loaded the cached drive
|
||||
// and need to wait for the fully synced drive
|
||||
postMessage("GET_PAD_DATA_FROM_CHANNEL", obj, function (data) {
|
||||
cb(void 0, data);
|
||||
});
|
||||
}, {timeout: -1});
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1268,8 +1268,17 @@ define([
|
|||
}
|
||||
});
|
||||
});
|
||||
var result = res || viewRes;
|
||||
|
||||
// If we're not fully synced yet and we don't have a result, wait for the ready event
|
||||
if (!result && store.offline) {
|
||||
onReadyEvt.reg(function () {
|
||||
Store.getPadDataFromChannel(clientId, obj, cb);
|
||||
});
|
||||
return;
|
||||
}
|
||||
// Call back with the best value we can get
|
||||
cb(res || viewRes || {});
|
||||
cb(result || {});
|
||||
};
|
||||
|
||||
// Hidden hash: if a pad is deleted, we may have to switch back to full hash
|
||||
|
|
Loading…
Reference in New Issue