From c49912ea4a280670a46fbc15b0498ee8bc68d5cb Mon Sep 17 00:00:00 2001 From: Jose Montero Date: Tue, 25 Jul 2023 01:38:31 +0200 Subject: [PATCH] Fixed JS assuming "o_form_sheet_bg" is always found --- web_chatter_position/static/src/js/web_chatter_position.esm.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web_chatter_position/static/src/js/web_chatter_position.esm.js b/web_chatter_position/static/src/js/web_chatter_position.esm.js index 3c648ce0f886..6e323db077ee 100644 --- a/web_chatter_position/static/src/js/web_chatter_position.esm.js +++ b/web_chatter_position/static/src/js/web_chatter_position.esm.js @@ -126,6 +126,9 @@ patch(FormCompiler.prototype, "web_chatter_position", { chatterContainerHookXml.setAttribute("t-if", false); } else { const formSheetBgXml = res.querySelector(".o_form_sheet_bg"); + if (!formSheetBgXml) { + return res; + } const sheetBgChatterContainerHookXml = chatterContainerHookXml.cloneNode(true); sheetBgChatterContainerHookXml.classList.add("o-isInFormSheetBg");