blacklistPage and whitelistPage do not support RegExp
evheniyrz opened this issue ยท 2 comments
evheniyrz commented
Bug Report or Feature Request (mark with an x
)
- [x] bug report -> please search issues before submitting
- [ ] feature request
CookieConsent and Library Versions?
- cookieconsent version: 3.1.1
- ngx-cookieconsent version: 2.2.3
OS Version?
Windows 10 64-bit
Angular, Node and al Versions?
Angular 10
Repro steps
- Create a cookie consent config.
- Try to add
whitelistPage
orblacklistPage
to configuration with RegExp value.
The log given by the failure
Type 'RegExp' is not assignable to type 'string' .ts(2322)
Desired functionality
a regular expression can be added to a whitelist Page
or blacklist Page
by the documentation
/**
* Simple whitelist for pages. specify page by:
* - using a string : '/index.html' (matches '/index.html' exactly) OR
* - using RegExp : /\/page_[\d]+\.html/ (matched '/page_1.html' and '/page_2.html' etc)
*
*/
whitelistPage?: string[]; !!!!!!!!!! why only : string[]
/**
* Simple blacklist for pages. specify page by:
* - using a string : '/index.html' (matches '/index.html' exactly) OR
* - using RegExp : /\/page_[\d]+\.html/ (matched '/page_1.html' and '/page_2.html' etc)
*
*/
blacklistPage?: string[]; !!!!!!!!! why only : string[]
thanks for consideration
tinesoft commented
Hi @evheniyrz !
First of all, thanks for using the library and for issuing the 100th issue! ๐
I will fix that ASAP, stay tuned.
Cheers!
github-actions commented
๐ This issue has been resolved in version 3.0.0 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐