diff --git a/Changelog.md b/Changelog.md index a7540635bde3c1af0f1aabbd09f1a664942da76e..7255415d954ea83efc9c443d4797d08c3be19cdd 100644 --- a/Changelog.md +++ b/Changelog.md @@ -10,6 +10,7 @@ * Don't use Pathname early to circumvent some rare initialization errors [#3816](https://github.com/diaspora/diaspora/issues/3816) * Don't error out in script/server if git is unavailable. * Fix post preview from tag pages [#4157](https://github.com/diaspora/diaspora/issues/4157) +* Fix tags ordering in chrome [#4133](https://github.com/diaspora/diaspora/issues/4133) ## Features diff --git a/app/assets/javascripts/app/collections/tag_followings.js b/app/assets/javascripts/app/collections/tag_followings.js index ab0a9f78395bacbc4d00640813dd6ef7a672423a..870878ba71daa4880c4c8adaac9e40dad5199a47 100644 --- a/app/assets/javascripts/app/collections/tag_followings.js +++ b/app/assets/javascripts/app/collections/tag_followings.js @@ -3,7 +3,7 @@ app.collections.TagFollowings = Backbone.Collection.extend({ model: app.models.TagFollowing, url : "/tag_followings", comparator: function(first_tf, second_tf) { - return first_tf.get("name") < second_tf.get("name"); + return -first_tf.get("name").localeCompare(second_tf.get("name")); }, create : function(model) { diff --git a/spec/javascripts/app/collections/tag_following_collection_spec.js b/spec/javascripts/app/collections/tag_following_collection_spec.js index cffdd4ae66ff77f3d8cc958f32bcb86be0280f4f..b3b4c646cd2bffea9a703dda32040de60afe5ad4 100644 --- a/spec/javascripts/app/collections/tag_following_collection_spec.js +++ b/spec/javascripts/app/collections/tag_following_collection_spec.js @@ -7,7 +7,7 @@ describe("app.collections.TagFollowings", function(){ it("should compare in reverse order", function() { var a = new app.models.TagFollowing({name: "aaa"}), b = new app.models.TagFollowing({name: "zzz"}) - expect(this.collection.comparator(a, b)).toBe(true) + expect(this.collection.comparator(a, b)).toBeGreaterThan(0) }) })