diff --git a/api/js/etemplate/etemplate2.ts b/api/js/etemplate/etemplate2.ts index 98d9264c90..70e495bd73 100644 --- a/api/js/etemplate/etemplate2.ts +++ b/api/js/etemplate/etemplate2.ts @@ -970,7 +970,7 @@ export class etemplate2 { canSubmit = !(invalid = this.isInvalid(container, values)); } - invalid.then((widgets) => + invalid?.then((widgets) => { let invalid_widgets = widgets.filter((widget) => widget);