Commit d79bfe6f authored by JC Brand's avatar JC Brand

Use composition instead of chaining.

parent 7ae2e469
......@@ -887,7 +887,7 @@
*/
var resources = this.get('resources');
if (_.isObject(resources) && _.size(resources)) {
var val = _(resources).values().sortBy('priority').reverse().get(0);
var val = _.flow(_.values, _.partial(_.sortBy, _, 'priority'), _.reverse)(resources)[0];
if (!_.isUndefined(val)) {
return val.status;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment