diff --git a/build/index.js b/build/index.js index 5b47992..389661e 100644 --- a/build/index.js +++ b/build/index.js @@ -611,8 +611,8 @@ var CookieConsent = function (_Component) { this.setState({ visible: true }); } - // if acceptOnScroll is set to true and cookie is undefined or debug is set to true, add a listener. - if (this.props.acceptOnScroll && _jsCookie2.default.get(cookieName) === undefined || debug) { + // if acceptOnScroll is set to true and (cookie is undefined or debug is set to true), add a listener. + if (this.props.acceptOnScroll && (_jsCookie2.default.get(cookieName) === undefined || debug)) { window.addEventListener("scroll", this.handleScroll, { passive: true }); } } diff --git a/package.json b/package.json index 0ced6de..c86e00d 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "name": "Rick van Lieshout", "email": "info@rickvanlieshout.com" }, - "version": "2.3.1", + "version": "2.3.2", "description": "A small, simple and customizable cookie consent bar for use in React applications.", "main": "build/index.js", "types": "build/index.d.ts",