text: fix receiving null/undefined

This commit is contained in:
jean-emmanuel 2017-05-30 12:24:38 +02:00
parent 0c40c08642
commit bb5b8b2dbc

View file

@ -81,7 +81,7 @@ module.exports = class Text extends _widgets_base {
setValue(v) {
this.value = typeof v=='object' && !v.length ? this.defaultValue : v
this.value = v==null ? this.defaultValue : v
this.widget.html(iconify(this.value))
}