Skip to content
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

ngx-scroll-to interferes with ngrx store #83

Closed
trobbertze opened this issue May 10, 2018 · 3 comments
Closed

ngx-scroll-to interferes with ngrx store #83

trobbertze opened this issue May 10, 2018 · 3 comments

Comments

@trobbertze
Copy link

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[X ] Bug report  
[ ] Feature request
[ ] Documentation issue or request

Current behavior

I have an Angular project that uses ngrx as a redux store. Everything works fine.

I've successfully installed ngrx-scroll-to and it works like a charm.

Here is the thing though. Once you have pressed a button that contains the ngrx-scroll-to directive, I get errors when I dispatch ngrx actions. Any actions dispatched before the button was pressed works fine.

This is the error that is output to the console:

RedeemFundsComponent.html:272 ERROR TypeError: toISOString is not a function
at String.toJSON ()
at Object. (vendor.bundle.js?=2.1.0-beta.1:1)
at derez (:1:65467)
at derez (:1:66088)
at derez (:1:66088)
at derez (:1:66088)
at derez (:1:66088)
at derez (:1:66088)
at derez (:1:66088)
at derez (:1:65906)
at derez (:1:66088)
at derez (:1:66088)
at derez (:1:65906)
at derez (:1:66088)
at derez (:1:65906)

And this is the error that I catch when I pause on exception:

TypeError: Converting circular structure to JSON.

Expected behavior

ngx-scroll-to should not interfere with ngx actions.

I am not really looking for a fix here, I am rather just looking for some guidance on how to debug this issue and to get the 2 libraries working together.

Environment


Angular version: 4.4.6


Your version of `@nicky-lenaers/ngx-scroll-to`:0.6.0


Browser:
- [X] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

@trobbertze
Copy link
Author

As far as what I can see is that the error is because I am sending an unserialisable value as the action payload. The thing is I am only sending a string and nothing changes in the payload once I press the button.

@trobbertze
Copy link
Author

This is the exact issue that I am getting:

zloirock/core-js#347

Disabling redux dev tools helped for me.

I realise this is not a direct issue for you but what makes it strange is that I only get this issue when I use your module.

I found a couple of places where they mentioned that the es6 date polyfill might be the root cause or lazy loading of modules.

@nicky-lenaers
Copy link
Owner

Hi @trobbertze , thank you for reporting your issue. Like you mentioned, this issue is not related to this plugin. Therefor, closing 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants