mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -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() {
|
didInsertElement() {
|
||||||
this._super();
|
this._super();
|
||||||
|
|
||||||
|
Ember.run.scheduleOnce('afterRender', () => {
|
||||||
this.set("numOfVotersToShow", Math.round(this.$().width() / 25) * 2);
|
this.set("numOfVotersToShow", Math.round(this.$().width() / 25) * 2);
|
||||||
if (this.get("voterIds").length > 0) this._fetchUsers();
|
if (this.get("voterIds").length > 0) this._fetchUsers();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
Loading…
Reference in New Issue
Block a user