mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:47:22 +08:00
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
|
||||
const $fields = this.$('.composer-fields');
|
||||
const fieldPos = $fields.position();
|
||||
if (fieldPos) {
|
||||
this.$('.wmd-controls').css('top', $fields.height() + fieldPos.top + 5);
|
||||
if ($fields) {
|
||||
const fieldPos = $fields.position();
|
||||
if (fieldPos) {
|
||||
this.$('.wmd-controls').css('top', $fields.height() + fieldPos.top + 5);
|
||||
}
|
||||
}
|
||||
|
||||
// get the submit panel height
|
||||
|
|
Loading…
Reference in New Issue
Block a user