Skip to content

Commit f17a032

Browse files
sandangelbrandonroberts
authored andcommitted
fix(RouterStore): Allow strict mode with router reducer (#903)
1 parent 839b42a commit f17a032

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/router-store/src/router_store_module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export type RouterReducerState<T = RouterStateSnapshot> = {
9696
};
9797

9898
export function routerReducer<T = RouterStateSnapshot>(
99-
state: RouterReducerState<T>,
99+
state: RouterReducerState<T> | undefined,
100100
action: RouterAction<any, T>
101101
): RouterReducerState<T> {
102102
switch (action.type) {
@@ -108,7 +108,7 @@ export function routerReducer<T = RouterStateSnapshot>(
108108
navigationId: action.payload.event.id,
109109
};
110110
default:
111-
return state;
111+
return state as RouterReducerState<T>;
112112
}
113113
}
114114

0 commit comments

Comments
 (0)