Skip to content

Commit

Permalink
allowing orderBy to use a property path
Browse files Browse the repository at this point in the history
  • Loading branch information
mauritslamers committed Mar 3, 2017
1 parent 59d18e0 commit 90ec239
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frameworks/core_foundation/controllers/array.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@ SC.ArrayController = SC.Controller.extend(SC.Array, SC.SelectionSupport,
}
order = match[2] ? -1 : 1;

if (a) { valueA = a.isObservable ? a.get(key) : a[key]; }
if (b) { valueB = b.isObservable ? b.get(key) : b[key]; }
if (a) { valueA = a.isObservable ? a.getPath(key) : a[key]; }
if (b) { valueB = b.isObservable ? b.getPath(key) : b[key]; }

status = SC.compare(valueA, valueB) * order;
}
Expand Down

0 comments on commit 90ec239

Please sign in to comment.