mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 05:43:16 +08:00
use Ember.set() to set the dasherized_name
property
This commit is contained in:
parent
1b92d44fb2
commit
c834d591a3
|
@ -87,7 +87,7 @@ export default Ember.Controller.extend(CanCheckEmails, {
|
|||
if (!Ember.isEmpty(siteUserFields)) {
|
||||
const userFields = this.get('model.user_fields');
|
||||
return siteUserFields.filterBy('show_on_profile', true).sortBy('position').map(field => {
|
||||
field.dasherized_name = field.get('name').dasherize();
|
||||
Ember.set(field, 'dasherized_name', field.get('name').dasherize());
|
||||
const value = userFields ? userFields[field.get('id').toString()] : null;
|
||||
return Ember.isEmpty(value) ? null : Ember.Object.create({ value, field });
|
||||
}).compact();
|
||||
|
|
Loading…
Reference in New Issue
Block a user