Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #3 from xaka/patch-1

Fix preferring earlier candidates
  • Loading branch information...
commit 1a1ebd671a23520d205fe06d339ed54a1bbc6a00 2 parents cdb34ae + 96b6179
@niclashoyer authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.