Skip to content

Commit 70043e1

Browse files
author
Frédéric Barrière
committed
fix(RouterStore): support objects for options of StoreRouterConnectingModule
1 parent 6ed92b0 commit 70043e1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

modules/router-store/src/router_store_module.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,15 @@ export const ROUTER_CONFIG = new InjectionToken(
124124
);
125125
export const DEFAULT_ROUTER_FEATURENAME = 'routerReducer';
126126

127-
export function _createDefaultRouterConfig(config: any): StoreRouterConfig {
128-
let _config = {};
127+
export function _createDefaultRouterConfig(
128+
config: StoreRouterConfig | StoreRouterConfigFunction
129+
): StoreRouterConfig {
130+
let _config: StoreRouterConfig;
129131

130132
if (typeof config === 'function') {
131133
_config = config();
134+
} else {
135+
_config = config || {};
132136
}
133137

134138
return {

0 commit comments

Comments
 (0)