Fix jobs display and priming

This commit is contained in:
Berkeley Martinez
2016-02-28 23:01:26 -08:00
parent f6c1260336
commit 5ee802999e
3 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@ const bindableActions = {
const fetchOptions = {
fetchAction: 'fetchJobs',
isPrimed({ jobs }) {
return !!jobs.results.length;
return !!jobs.length;
}
};

View File

@ -54,7 +54,7 @@ export default function contain(options = {}, Component) {
options.getActionArgs :
(() => []);
const isPrimed = typeof typeof options.isPrimed === 'function' ?
const isPrimed = typeof options.isPrimed === 'function' ?
options.isPrimed :
(() => false);

View File

@ -32,7 +32,7 @@ export default function getJobServices(app) {
return Job.findById(id, cb);
}
Job.find(whereFilt, (err, jobs) => {
cb(err, jobs);
cb(err, jobs.map(job => job.toJSON()));
});
}
};