From 26abeb0ad2b9be93d2b61278b0f124dec2069006 Mon Sep 17 00:00:00 2001 From: Elena Baidakova Date: Thu, 15 Jun 2023 15:02:39 +0400 Subject: [PATCH] Hide announcement bar script if visibility wasn't chosen no issue --- ghost/core/core/frontend/helpers/ghost_head.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ghost/core/core/frontend/helpers/ghost_head.js b/ghost/core/core/frontend/helpers/ghost_head.js index 8252932826..7c6440794e 100644 --- a/ghost/core/core/frontend/helpers/ghost_head.js +++ b/ghost/core/core/frontend/helpers/ghost_head.js @@ -89,8 +89,9 @@ function getSearchHelper(frontendKey) { function getAnnouncementBarHelper(data) { const preview = data?.site?._preview; + const isFilled = settingsCache.get('announcement_content') && settingsCache.get('announcement_visibility').length; - if (!settingsCache.get('announcement_content') && !preview) { + if (!isFilled && !preview) { return ''; }