Skip to content
This repository has been archived by the owner on Jan 8, 2021. It is now read-only.

Commit

Permalink
Fix playlist sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeese committed Jan 16, 2019
1 parent 3a0ddd6 commit 4c204ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/assets/javascripts/add-playlist-option.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ matchWithNew = (params, data) ->

sortWithNew = (data) ->
return data.sort((a, b) ->
if (a.text < b.text || a.text == addnew)
if (b.text.trim() == addnew)
return 1
if (a.text < b.text || a.text.trim() == addnew)
return -1
if (a.text > b.text)
return 1
Expand Down

0 comments on commit 4c204ab

Please sign in to comment.