grrr-amsterdam / cookie-consent

Cookie consent with accessible dialog, agnostic tag triggers and conditional content, script and embed hooks.
MIT License
63 stars 11 forks source link

Config module return value updated with ternary operator (bugfix) #9

Closed bornemisza closed 4 years ago

bornemisza commented 4 years ago

BUG: If the append settings parameter false, then always returns the default value which is true. APPEARS: The cookie-consent module:36 has conditional statement which compares config.append with false.

bornemisza commented 4 years ago

@harmenjanssen Thank you. I extended the PR, but not exactly know why Travis failed.

In local env all test passed:

PASS test/config.test.js
PASS test/preferences.test.js

Test Suites: 2 passed, 2 total Tests: 7 passed, 7 total Snapshots: 0 total Time: 3.686 s Ran all test suites. Done in 4.97s.

node version: 12.18.4 yarn version: 1.22.0 npm version: 6.14.6 OS: Windows 10 & Ubuntu 20.04

harmenjanssen commented 4 years ago

I see, it's failing on eslint:

/home/travis/build/grrr-amsterdam/cookie-consent/test/config.test.js
  5:27  error  A space is required after '{'   object-curly-spacing
  5:41  error  A space is required before '}'  object-curly-spacing

If you could make this last change I will happily merge this in. 🙂

harmenjanssen commented 4 years ago

Your change is published to NPM in version 1.0.1.