diff --git a/app/assets/javascripts/add-playlist-option.js.coffee b/app/assets/javascripts/add-playlist-option.js.coffee index 491a713..d0c9bff 100644 --- a/app/assets/javascripts/add-playlist-option.js.coffee +++ b/app/assets/javascripts/add-playlist-option.js.coffee @@ -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