mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
FIX: Safer JS code
This commit is contained in:
parent
f11bdd13fc
commit
d1717cdb12
1 changed files with 7 additions and 3 deletions
|
@ -125,9 +125,13 @@ export default Ember.Component.extend({
|
|||
clearInterval(this._resizeInterval);
|
||||
this._resizeInterval = setInterval(() => {
|
||||
Ember.run(() => {
|
||||
const contentHeight = parseInt(this.$('.panel-body-contents').height());
|
||||
if (contentHeight !== this._lastHeight) { this.performLayout(); }
|
||||
this._lastHeight = contentHeight;
|
||||
const $panelBodyContents = this.$('.panel-body-contents');
|
||||
|
||||
if ($panelBodyContents.length) {
|
||||
const contentHeight = parseInt($panelBodyContents.height());
|
||||
if (contentHeight !== this._lastHeight) { this.performLayout(); }
|
||||
this._lastHeight = contentHeight;
|
||||
}
|
||||
});
|
||||
}, 500);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue