Fix error if field to translate is not textarea

pull/1801/head
Akim Juillerat 2019-07-24 11:29:33 +02:00 committed by fshah
parent 4cbe5a7217
commit f6180af4c0
1 changed files with 4 additions and 2 deletions

View File

@ -109,8 +109,10 @@ var translateDialog = Dialog.extend({
'data-value', values[f] || '');
});
var textarea = this.$el.find('textarea.oe_translation_field');
textarea.css({minHeight:'100px',});
dom.autoresize(textarea, {parent: this.$el});
if (textarea !== undefined && textarea[0] !== undefined) {
textarea.css({minHeight:'100px',});
dom.autoresize(textarea, {parent: this.$el});
}
$(window).resize();
this.initialize_html_fields(lang);
},