FIX: Error finding `$fields.position` during tests
This commit is contained in:
parent
217007ff54
commit
f51bf2358e
|
@ -35,9 +35,11 @@ export default Ember.Component.extend({
|
||||||
|
|
||||||
// Figure out the size of the fields
|
// Figure out the size of the fields
|
||||||
const $fields = this.$('.composer-fields');
|
const $fields = this.$('.composer-fields');
|
||||||
const fieldPos = $fields.position();
|
if ($fields) {
|
||||||
if (fieldPos) {
|
const fieldPos = $fields.position();
|
||||||
this.$('.wmd-controls').css('top', $fields.height() + fieldPos.top + 5);
|
if (fieldPos) {
|
||||||
|
this.$('.wmd-controls').css('top', $fields.height() + fieldPos.top + 5);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the submit panel height
|
// get the submit panel height
|
||||||
|
|
Loading…
Reference in New Issue