Skip to content

Commit 20afb21

Browse files
fix(router-store): google upstream (#3177)
1 parent 0217790 commit 20afb21

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

modules/router-store/src/router_store_module.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

383384
function 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

Comments
 (0)