fix TypeError: Cannot read properties of null (reading 'trim')

This commit is contained in:
ralf 2023-07-26 14:20:13 +02:00
parent fbea686a71
commit 44359621a3

View File

@ -276,7 +276,7 @@ export class et2_customfields_list extends et2_valueWidget implements et2_IDetac
else else
{ {
// Label in first column, widget in 2nd // Label in first column, widget in 2nd
const label = this.options.label || field.label; const label = this.options.label || field.label || '';
jQuery(document.createElement("td")) jQuery(document.createElement("td"))
.prependTo(row); .prependTo(row);
et2_createWidget("label", {id: id + "_label", value: label.trim(), for: id}, this); et2_createWidget("label", {id: id + "_label", value: label.trim(), for: id}, this);