From fa1b3784e76253ead87fc3e8a052012cf690fb94 Mon Sep 17 00:00:00 2001 From: Nicholas Case Date: Wed, 27 Jun 2018 12:07:05 -0700 Subject: [PATCH] fix blockBrowsing when no CMP needed --- src/components/app.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/app.jsx b/src/components/app.jsx index 96a6e84..fad7b26 100644 --- a/src/components/app.jsx +++ b/src/components/app.jsx @@ -106,8 +106,11 @@ export default class App extends Component { const showConsentToolButtonClicked = RegExp('showConsentTool').test(target.getAttribute('onclick')); const appDiv = self.base; const { layout } = config; + const { isConsentToolShowing, isFooterConsentToolShowing, isThinConsentToolShowing, isFooterShowing } = store; - if (!showConsentToolButtonClicked && !appDiv.contains(target)) { + if ( (isConsentToolShowing || isFooterConsentToolShowing || isThinConsentToolShowing || isFooterShowing) && + !showConsentToolButtonClicked && + !appDiv.contains(target) ) { store.toggleConsentToolShowing(false); // Render footer style CMP if no consent decision has been submitted yet