0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Fix tag order

fixes #4151
- Properly re-add pre-existing tags to beginning of array
This commit is contained in:
Fabian Becker 2014-09-24 21:56:37 +00:00
parent 4756fab14d
commit f73fbf2538

View file

@ -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;
}),