Skip to content

Cannot read property 'palette' of nullΒ #75

Open
@Kenji94

Description

Hi,

Thank you for your lib!

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> 'Cannot read property 'palette' of null'

### CookieConsent and Library Versions?

 "cookieconsent": "^3.1.1",
 "ngx-cookieconsent": "^2.2.3",

OS Version?

browser Chrome Mobile 77.0.3865

Angular, Node and al Versions?

angular 9

Repro steps

Bug: 'Cannot read property 'palette' of null'
Cannot reproduce locally but is happening for some user on prod
This is happening either when:
this.ccService.destroy(); high chance this is happening on this line
or
this.ccService.init(this.ccService.getConfig()); low chance it is happening on this line

The log given by the failure

Node.removeChild(s),e.customStyles[n]=null}}}(this.options.palette),this.options=null},o.prototype.open=function(t){if(this.element)return t {snip}

Desired functionality

No crash

Mention any other details that might be useful

in my setup i have:
const cookieConfig: NgcCookieConsentConfig = {
cookie: {
domain: environment.domain
},
palette: {
popup: {
background: '#012E4B'
},
button: {
background: '#33B4A5'
}
},
theme: 'edgeless'
};

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions