From f73fbf253849e0a13531e00c7c38c33663dbffbf Mon Sep 17 00:00:00 2001 From: Fabian Becker Date: Wed, 24 Sep 2014 21:56:37 +0000 Subject: [PATCH] Fix tag order fixes #4151 - Properly re-add pre-existing tags to beginning of array --- core/client/controllers/post-tags-input.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/core/client/controllers/post-tags-input.js b/core/client/controllers/post-tags-input.js index d6325a2258..67e95673aa 100644 --- a/core/client/controllers/post-tags-input.js +++ b/core/client/controllers/post-tags-input.js @@ -6,7 +6,6 @@ var PostTagsInputController = Ember.Controller.extend({ var proxyTags = Ember.ArrayProxy.create({ content: this.get('parentController.tags') }), - temp = proxyTags.get('arrangedContent').slice(); proxyTags.get('arrangedContent').clear(); @@ -22,9 +21,7 @@ var PostTagsInputController = Ember.Controller.extend({ } }); - temp.forEach(function (tag) { - proxyTags.get('arrangedContent').addObject(tag); - }); + proxyTags.get('arrangedContent').unshiftObjects(temp); return proxyTags; }),