From b03bd93629124d215a78cddd2c4e63fecbcfdb78 Mon Sep 17 00:00:00 2001 From: Younn Olivier Date: Thu, 10 Feb 2022 15:50:36 +0100 Subject: [PATCH] [FIX] web, website: fix NavBar systrayItems getter patch After OWL next was merged, an error popped up while patching the Navbar systrayItems getter, coming from the Enterprise NavBar render. A setter was added on the NavBar component to allow the patch. task-2687506 --- addons/web/static/src/webclient/navbar/navbar.js | 4 ++++ addons/website/static/src/components/navbar/navbar.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/webclient/navbar/navbar.js b/addons/web/static/src/webclient/navbar/navbar.js index 44cdcf522e7..81bab76d696 100644 --- a/addons/web/static/src/webclient/navbar/navbar.js +++ b/addons/web/static/src/webclient/navbar/navbar.js @@ -92,6 +92,10 @@ export class NavBar extends Component { .reverse(); } + // This dummy setter is only here to prevent conflicts between the + // Enterprise NavBar extension and the Website NavBar patch. + set systrayItems(_) {} + /** * Adapt will check the available width for the app sections to get displayed. * If not enough space is available, it will replace by a "more" menu diff --git a/addons/website/static/src/components/navbar/navbar.js b/addons/website/static/src/components/navbar/navbar.js index eb605d27c2c..f70cddd517a 100644 --- a/addons/website/static/src/components/navbar/navbar.js +++ b/addons/website/static/src/components/navbar/navbar.js @@ -35,5 +35,5 @@ patch(NavBar.prototype, 'website_navbar', { .reverse(); } return this._super(); - } + }, });