Skip to content

EspoCRM – Open Source CRM Application

Fix menu init

Yurii4b2fd5f8f0d5
diff --git a/client/src/views/main.ts b/client/src/views/main.ts
index 082e7a4bf1..ea737861ab 100644
--- a/client/src/views/main.ts
+++ b/client/src/views/main.ts
@@ -254,6 +254,8 @@ class MainView<S extends MainViewSchema = MainViewSchema> extends View<S> {
this._reRenderHeaderOnSync = false;
this._menuHandlers = {};
+ this.menu = menu as any;
+
this.headerActionItemTypeList.forEach(type => {
let itemList = (menu[type] ?? []).concat(globalMenu[type] ?? []) as Record<string, any>[];
@@ -302,8 +304,6 @@ class MainView<S extends MainViewSchema = MainViewSchema> extends View<S> {
});
});
- this.menu = menu as any;
-
if (this.model) {
this.whenReady().then(() => {
if (!this._reRenderHeaderOnSync) {