Skip to content

Commit bbb7c99

Browse files
brandonrobertsMikeRyanDev
authored andcommitted
fix(RouterStore): Only serialize snapshot in preactivation hook (#287)
Closes #286
1 parent 78772b5 commit bbb7c99

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

modules/router-store/src/router_store_module.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,12 @@ export class StoreRouterConnectingModule {
225225
private dispatchRouterNavigation(): void {
226226
this.dispatchRouterAction(ROUTER_NAVIGATION, {
227227
routerState: this.routerState,
228-
event: {
229-
id: this.lastRoutesRecognized.id,
230-
url: this.lastRoutesRecognized.url,
231-
urlAfterRedirects: this.lastRoutesRecognized.urlAfterRedirects,
232-
state: this.serializer.serialize(this.routerState),
233-
} as RoutesRecognized,
228+
event: new RoutesRecognized(
229+
this.lastRoutesRecognized.id,
230+
this.lastRoutesRecognized.url,
231+
this.lastRoutesRecognized.urlAfterRedirects,
232+
this.routerState
233+
),
234234
});
235235
}
236236

0 commit comments

Comments
 (0)