From b0cfbbae8241ee52b1e24a593d66bc1dde89de84 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Mon, 1 Jul 2024 15:46:49 +0200 Subject: [PATCH] handling postContainer --- resources/js/single-conseil.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/js/single-conseil.js b/resources/js/single-conseil.js index 3998cc8..8663a96 100644 --- a/resources/js/single-conseil.js +++ b/resources/js/single-conseil.js @@ -58,6 +58,7 @@ export default function singleConseil() { ); function buildAllBlocksToObserve() { + const postsContainerBlocks = document.querySelectorAll('.post-content-container'); const questionsContainerBlocks = document.querySelectorAll('.questions-container-block'); const chapitresThematiques = document.querySelectorAll('.homegrade-blocks-chapitre-thematique'); const vocabulaireSummaryBlock = document.querySelector('.homegrade-blocks-vocabulaire-summary'); @@ -73,6 +74,7 @@ export default function singleConseil() { if (partnersOtherServices) allBlocks.push(partnersOtherServices); if (questionsContainerBlocks.length > 0) allBlocks = [...allBlocks, ...questionsContainerBlocks]; + if (postsContainerBlocks.length > 0) allBlocks = [...allBlocks, ...postsContainerBlocks]; if (chapitresThematiques.length > 0) allBlocks = [...allBlocks, ...chapitresThematiques]; return allBlocks;