-
-
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
Custom RouterStateSerializer is called with both the original and the custom serialized version #286
Comments
That is a bug, fix is here #287 |
brandonroberts
added a commit
that referenced
this issue
Aug 17, 2017
MikeRyanDev
pushed a commit
that referenced
this issue
Aug 17, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm submitting a...
What is the current behavior?
I've just upgraded
ngrx-router-store
to 4.0.3 to be able to provide a customRouterStateSerializer
to get both the dev-tools andngrx-store-freeze
working again. While debugging, I've recognized that this serializer is not only called with the router snapshot, but with the serialized version it generated before as well.I'm not sure if this is a bug w.r.t. the typings (i.e. it should be
RouterStateSnapshot | T
instead of justRouterStateSnapshot
) or a technical issue.Here is my current implementation, including a workaround to simply return the casted input instead of creating new data.
Expected behavior:
I would expect that either:
serialize
may be the custom state version.Minimal reproduction of the problem with instructions:
Minimal version: http://plnkr.co/edit/hlQKrHTDTqOrGasMkO4H
Just switch between the routes - two calls will be listed for each switch, one for the original snapshot and one for the serialized version. Calls are printed with
console.warn
.Version of affected browser(s),operating system(s), npm, node and ngrx:
Other information:
./.
The text was updated successfully, but these errors were encountered: