[FIX] web_responsive: Selection of menu fails

pull/2401/head
Enric Tobella 2023-02-02 14:04:43 +01:00
parent dafaf118c7
commit 15eee6feaa
1 changed files with 4 additions and 1 deletions

View File

@ -247,7 +247,7 @@ odoo.define("web_responsive", function (require) {
continue; continue;
} else { } else {
const root = this._isInMenuTree(node.children, id); const root = this._isInMenuTree(node.children, id);
if (root !== null) { if (root) {
return root; return root;
} }
} }
@ -273,6 +273,9 @@ odoo.define("web_responsive", function (require) {
}); });
// Find app that owns the chosen menu // Find app that owns the chosen menu
const app = this.menuData.children.find((app_menu) => { const app = this.menuData.children.find((app_menu) => {
if (app_menu.id == data.menuId) {
return true;
}
return this._isInMenuTree(app_menu, data.menuId); return this._isInMenuTree(app_menu, data.menuId);
}); });
if (!app) { if (!app) {