Skip to content

EspoCRM – Open Source CRM Application

Restore

Yuriidc2a7a935030
diff --git a/client/src/views/modal.ts b/client/src/views/modal.ts
index 71fc701e6f..ed50bc2266 100644
--- a/client/src/views/modal.ts
+++ b/client/src/views/modal.ts
@@ -173,11 +173,6 @@ class ModalView<S extends ViewSchema = ViewSchema> extends View<S> {
*/
protected className: string = 'dialog'
- /**
- * @deprecated Use `headerHtml`.
- */
- protected header: string
-
/**
* A header HTML. Beware of XSS.
*/
@@ -364,6 +359,10 @@ class ModalView<S extends ViewSchema = ViewSchema> extends View<S> {
let headerHtml = this.headerHtml;
+ if (this.$header && this.$header.length) {
+ headerHtml = this.$header.get(0)?.outerHTML as string;
+ }
+
if (this.headerElement) {
headerHtml = this.headerElement.outerHTML;
}