@@ -162,7 +162,7 @@ export class StoreRouterConnectingModule {
162162 private routerState : SerializedRouterStateSnapshot | null = null ;
163163 private storeState : any ;
164164 private trigger = RouterTrigger . NONE ;
165- private stateKey : StateKeyOrSelector ;
165+ private readonly stateKey : StateKeyOrSelector ;
166166
167167 static forRoot <
168168 T extends BaseRouterStoreState = SerializedRouterStateSnapshot
@@ -195,8 +195,9 @@ export class StoreRouterConnectingModule {
195195 private router : Router ,
196196 private serializer : RouterStateSerializer < SerializedRouterStateSnapshot > ,
197197 private errorHandler : ErrorHandler ,
198- @Inject ( ROUTER_CONFIG ) private config : StoreRouterConfig ,
199- @Inject ( ACTIVE_RUNTIME_CHECKS ) private activeRuntimeChecks : RuntimeChecks
198+ @Inject ( ROUTER_CONFIG ) private readonly config : StoreRouterConfig ,
199+ @Inject ( ACTIVE_RUNTIME_CHECKS )
200+ private readonly activeRuntimeChecks : RuntimeChecks
200201 ) {
201202 this . stateKey = this . config . stateKey as StateKeyOrSelector ;
202203
@@ -381,7 +382,7 @@ function isSameUrl(first: string, second: string): boolean {
381382}
382383
383384function stripTrailingSlash ( text : string ) : string {
384- if ( text . length > 0 && text [ text . length - 1 ] === '/' ) {
385+ if ( text ? .length > 0 && text [ text . length - 1 ] === '/' ) {
385386 return text . substring ( 0 , text . length - 1 ) ;
386387 }
387388 return text ;
0 commit comments