fix(Field): avoid wxs error when set autosize (#3038)

fix #3033
This commit is contained in:
rex 2020-04-18 23:17:17 +08:00 committed by GitHub
parent 10810e2b45
commit 74ea6cbafc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@
var utils = require('../wxs/utils.wxs');
function inputStyle(autosize) {
if (autosize.constructor === 'Object') {
if (autosize && autosize.constructor === 'Object') {
var style = '';
if (autosize.minHeight) {
style += 'min-height:' + utils.addUnit(autosize.minHeight) + ';';