@@ -162,7 +162,7 @@ export class StoreRouterConnectingModule {
162
162
private routerState : SerializedRouterStateSnapshot | null = null ;
163
163
private storeState : any ;
164
164
private trigger = RouterTrigger . NONE ;
165
- private stateKey : StateKeyOrSelector ;
165
+ private readonly stateKey : StateKeyOrSelector ;
166
166
167
167
static forRoot <
168
168
T extends BaseRouterStoreState = SerializedRouterStateSnapshot
@@ -195,8 +195,9 @@ export class StoreRouterConnectingModule {
195
195
private router : Router ,
196
196
private serializer : RouterStateSerializer < SerializedRouterStateSnapshot > ,
197
197
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
200
201
) {
201
202
this . stateKey = this . config . stateKey as StateKeyOrSelector ;
202
203
@@ -381,7 +382,7 @@ function isSameUrl(first: string, second: string): boolean {
381
382
}
382
383
383
384
function stripTrailingSlash ( text : string ) : string {
384
- if ( text . length > 0 && text [ text . length - 1 ] === '/' ) {
385
+ if ( text ? .length > 0 && text [ text . length - 1 ] === '/' ) {
385
386
return text . substring ( 0 , text . length - 1 ) ;
386
387
}
387
388
return text ;
0 commit comments