-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
store-devtools: actionsBlocklist issue with regex-like strings #2228
Comments
This is because we're creating using the strings as a RegExp - https://github.com/ngrx/platform/blob/master/modules/store-devtools/src/utils.ts#L168-L171 As a workaround you can do:
|
Right, but don't we want to fix it? Escape the string before passing it into match method? I was confused by it not working, I can imagine others may be too. |
A fix would be great! |
…rays of strings Closes ngrx#2228
Minimal reproduction of the bug/regression with instructions:
StackBlitz example to create a reproduction:
https://stackblitz.com/edit/ngrx-seed-qtqp9m
Expected behavior:
I expect that counter increment action should not be visible and tracked in the store devtools Chrome extension. But it is not filtered.
Versions of NgRx, Angular, Node, affected browser(s) and operating system(s):
angular 8.2
ngrx 8.2
node 10.15.3
Chrome 78
macOS 10.14.6
Other information:
After the quick code check it looks like action type strings are not escaped for use in regex 'match' method therefore square brackets are treated there as 'character class' symbols.
I would be willing to submit a PR to fix this issue
[x] Yes (Assistance is provided if you need help submitting a pull request)
[ ] No
The text was updated successfully, but these errors were encountered: