diff --git a/modules/router-store/src/router_store_module.ts b/modules/router-store/src/router_store_module.ts index e77ec9b567..0e76b3604a 100644 --- a/modules/router-store/src/router_store_module.ts +++ b/modules/router-store/src/router_store_module.ts @@ -124,11 +124,15 @@ export const ROUTER_CONFIG = new InjectionToken( ); export const DEFAULT_ROUTER_FEATURENAME = 'routerReducer'; -export function _createDefaultRouterConfig(config: any): StoreRouterConfig { - let _config = {}; +export function _createDefaultRouterConfig( + config: StoreRouterConfig | StoreRouterConfigFunction +): StoreRouterConfig { + let _config: StoreRouterConfig; if (typeof config === 'function') { _config = config(); + } else { + _config = config || {}; } return {