Skip to content

JS error when Cookie icon is hidden #16

@anoriell

Description

@anoriell

I get this error:

Image
Uncaught TypeError: can't access property "classList", document.getElementById(...) is null
    <anonymous> https://centrumczasdlanas.pl/wp-content/plugins/simple-consent-mode/assets/scripts/simple-consent-mode-frontend.min.js?ver=1.3.2:5
    EventListener.handleEvent* https://centrumczasdlanas.pl/wp-content/plugins/simple-consent-mode/assets/scripts/simple-consent-mode-frontend.min.js?ver=1.3.2:5
    EventListener.handleEvent* https://centrumczasdlanas.pl/wp-content/plugins/simple-consent-mode/assets/scripts/simple-consent-mode-frontend.min.js?ver=1.3.2:5
[simple-consent-mode-frontend.min.js:5:1554](https://centrumczasdlanas.pl/wp-content/plugins/simple-consent-mode/assets/scripts/simple-consent-mode-frontend.min.js?ver=1.3.2)
    <anonymous> https://centrumczasdlanas.pl/wp-content/plugins/simple-consent-mode/assets/scripts/simple-consent-mode-frontend.min.js?ver=1.3.2:5
    (Async: EventListener.handleEvent)
    <anonymous> https://centrumczasdlanas.pl/wp-content/plugins/simple-consent-mode/assets/scripts/simple-consent-mode-frontend.min.js?ver=1.3.2:5
    (Async: EventListener.handleEvent)
    <anonymous> https://centrumczasdlanas.pl/wp-content/plugins/simple-consent-mode/assets/scripts/simple-consent-mode-frontend.min.js?ver=1.3.2:5 

When the Cookie icon is hidden. I mean the literal little cookie in the left bottom corner. When in the plugin settings I chose not to have it then I get the above error.
I guess there is some IF missing utilizing this setting?

Could you take a look? :)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions