Make sure value is set before using it

This commit is contained in:
Hadi Nategh 2021-12-09 14:02:35 +01:00
parent d6cca90dbf
commit 2bcd6b16d8

View File

@ -4736,7 +4736,7 @@ app.classes.mail = AppJS.extend(
{ {
widgets[widget] = this.et2.getWidgetById(widget); widgets[widget] = this.et2.getWidgetById(widget);
if (widgets[widget].get_value().length) if (widgets[widget].get_value() && widgets[widget].get_value().length)
{ {
switch (widget) switch (widget)
{ {