Permalink
Browse files

Merge pull request #3 from xaka/patch-1

Fix preferring earlier candidates
  • Loading branch information...
2 parents cdb34ae + 96b6179 commit 1a1ebd671a23520d205fe06d339ed54a1bbc6a00 @niclashoyer committed Feb 5, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Accept.coffee
View
4 src/Accept.coffee
@@ -207,9 +207,9 @@ getBestMediaMatch = (candidates) ->
return 1
# If all else is equal, prefer earlier candidates.
- if a.index > b.index
- return -1
if a.index < b.index
+ return -1
+ if a.index > b.index
return 1
candidates[acceptable[0].index] if acceptable[0].quality

0 comments on commit 1a1ebd6

Please sign in to comment.