in public/src/js/models/collections/collection.js [130:158]
load(opts = {}) {
return authedAjax.request({
url: vars.CONST.apiBase + '/collection/' + this.id
})
.then(raw => {
if (opts.isRefresh && this.isPending()) { return; }
if (!raw) { return; }
this.state.hasConcurrentEdits(false);
// We need to wait for the populate
const wait = this.populate(raw);
populateObservables(this.collectionMeta, raw);
this.collectionMeta.updatedBy(raw.updatedEmail === deepGet(vars, '.model.identity.email') ? 'you' : raw.updatedBy);
this.state.timeAgo(this.getTimeAgo(raw.lastUpdated));
return wait;
})
.catch(ex => {
// Network errors should be ignored
if (ex instanceof Error) {
reportErrors(ex);
}
})
.then(() => this.setPending(false));
}