FIX: Error finding `$fields.position` during tests

This commit is contained in:
Robin Ward 2016-11-22 14:28:10 -05:00
parent 217007ff54
commit f51bf2358e
1 changed files with 5 additions and 3 deletions

View File

@ -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