From 11be31ace6e2fc6307491966b5ad559d196efbdc Mon Sep 17 00:00:00 2001 From: Luis Zenteno Date: Mon, 7 Oct 2024 10:05:44 -0600 Subject: [PATCH] fix(document): add setTimeout when hiding osano cookie icon --- pages/_document.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pages/_document.js b/pages/_document.js index 8bec4cbe52..d1d4999648 100644 --- a/pages/_document.js +++ b/pages/_document.js @@ -174,7 +174,9 @@ export default class MyDocument extends Document { dangerouslySetInnerHTML={{ __html: ` document.addEventListener('DOMContentLoaded', function(event) { - document.getElementsByClassName('osano-cm-window__widget osano-cm-widget osano-cm-widget--position_right')[0].style.display = 'none'; + setTimeout(() => { + document.getElementsByClassName('osano-cm-window__widget osano-cm-widget osano-cm-widget--position_right')[0].style.display = 'none'; + }, 100); }); `, }}