mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:30:26 -06:00
FIX: edit category modal throws EmberError when allowed tag groups is set
This commit is contained in:
parent
60f30aa6ad
commit
6e47e02738
@ -8,12 +8,14 @@ export default Ember.TextField.extend({
|
||||
|
||||
_initValue: function() {
|
||||
const names = this.get('tagGroups') || [];
|
||||
this.set('value', names.join(", "));
|
||||
this.set('value', names.join(","));
|
||||
}.on('init'),
|
||||
|
||||
_valueChanged: function() {
|
||||
const names = this.get('value').split(',').map(v => v.trim()).reject(v => v.length === 0).uniq();
|
||||
this.set('tagGroups', names);
|
||||
if ( this.get('tagGroups').join(',') !== this.get('value') ) {
|
||||
this.set('tagGroups', names);
|
||||
}
|
||||
}.observes('value'),
|
||||
|
||||
_tagGroupsChanged: function() {
|
||||
|
Loading…
Reference in New Issue
Block a user