mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:16:38 -06:00
FIX: Don't modify variables when rendering
This commit is contained in:
parent
5ba653d604
commit
054c428ba3
@ -40,8 +40,10 @@ export default Ember.Component.extend({
|
||||
didInsertElement() {
|
||||
this._super();
|
||||
|
||||
this.set("numOfVotersToShow", Math.round(this.$().width() / 25) * 2);
|
||||
if (this.get("voterIds").length > 0) this._fetchUsers();
|
||||
Ember.run.scheduleOnce('afterRender', () => {
|
||||
this.set("numOfVotersToShow", Math.round(this.$().width() / 25) * 2);
|
||||
if (this.get("voterIds").length > 0) this._fetchUsers();
|
||||
});
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
Loading…
Reference in New Issue
Block a user